fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

ccoVeilleFix typos in completions scripts0df6fa791

master
1.0 KiB19 linesraw
1# Completions for trash-cli
2# There are many implementations of trash cli tools, identify different version of ``trash`` executable by its help message.
3
4# https://github.com/andreafrancia/trash-cli
5function __trash_by_andreafrancia
6    complete -f -c trash -s h -l help -d 'show help message'
7    complete -f -c trash -l print-completion -xa 'bash zsh tcsh' -d 'print shell completion script'
8    complete -f -c trash -s d -l directory -d 'ignored (for GNU rm compatibility)'
9    complete -f -c trash -s f -l force -d 'silently ignore nonexistent files'
10    complete -f -c trash -s i -l interactive -d 'prompt before every removal'
11    complete -f -c trash -s r -s R -l recursive -d 'ignored (for GNU rm compatibility)'
12    complete -F -c trash -l trash-dir -d 'specify trash folder'
13    complete -f -c trash -s v -l verbose -d 'be verbose'
14    complete -f -c trash -l version -d 'show version number'
15end
16
17if string match -qr "https://github.com/andreafrancia/trash-cli" (trash --help 2>/dev/null)
18    __trash_by_andreafrancia
19end