fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a9618477e
master
1function __fish_complete_abook_formats --description'Complete abook formats' 2set -l format 3abook --formats| while read -l x 4switch $x 5case "input formats:" 6set format input 7case "output formats:" 8set format output 9case "query-compatible output formats:" 10set format ignore 11end 12set --append" $format " ( string replace -rf'\t(.*\t.*)' '$1' --$x ) 13end 14switch $argv [ 1 ] 15case in 16for lin $input 17echo $l 18end 19case out 20for lin $output 21echo $l 22end 23case '*' 24return 1 25end 26end 27 28complete -c abook -s h -d'Show usage' 29complete -c abook -s C -l config -d'Use an alternative configuration file' -r 30complete -c abook -l datafile -d'Use an alternative addressbook file' -r 31complete -c abook -l mutt-query -d'Make a query for mutt' -x 32complete -c abook -l add-email -d'Read email message from stdin and add the sender' 33complete -c abook -l add-email-quiet -d'Same as --add-email. Without confirmation' 34complete -c abook -l convert -d'Convert address book files' 35 36set -l convert'contains -- --convert (commandline -px)' 37complete -c abook -l informat -d'Input file format' -xa'(__fish_complete_abook_formats in)' -n$convert 38complete -c abook -l outformat -d'Output file format' -xa'(__fish_complete_abook_formats out)' -n$convert 39complete -c abook -l infile -d'Input file (default: stdin)' -r -n$convert 40complete -c abook -l outfile -d'Output file (default: stdout)' -r -n$convert 41 42complete -c abook -l formats -d'Print available formats'