~hedy/dotfiles

dotfiles/.config/fish/functions/read_confirm.fish -rw-r--r-- 183 bytes
29d99131 — hedy Fish: Fix prompt for fish v3.4.1 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
function read_confirm
  while true
    read -l -P "$argv[1] [y/N] " confirm

    switch $confirm
      case Y y
        return 0
      case '' N n
        return 1
    end
  end
end