mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03:00
Move __fish_complete_abook_formats to abook
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
|
||||
function __fish_complete_abook_formats --description 'Complete abook formats'
|
||||
set -l pat
|
||||
switch $argv[1]
|
||||
case in
|
||||
set pat '/output:/,$d; /input:\|^$/d'
|
||||
case out
|
||||
set pat '/input:/,/output:/d; /^$/d'
|
||||
case '*'
|
||||
return 1
|
||||
end
|
||||
abook --formats | sed -e $pat -e 's/^\s\+//'
|
||||
end
|
||||
|
||||
complete -c abook -s h -d 'Show usage'
|
||||
complete -c abook -s C -l config -d 'Use an alternative configuration file' -r
|
||||
complete -c abook -l datafile -d 'Use an alternative addressbook file' -r
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
function __fish_complete_abook_formats --description 'Complete abook formats'
|
||||
set -l pat
|
||||
switch $argv[1]
|
||||
case in
|
||||
set pat '/output:/,$d; /input:\|^$/d'
|
||||
case out
|
||||
set pat '/input:/,/output:/d; /^$/d'
|
||||
case '*'
|
||||
return 1
|
||||
end
|
||||
abook --formats | sed -e $pat -e 's/^\s\+//'
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user