Minor completion updates for umount

darcs-hash:20051017132746-ac50b-4f69deeeed995370e35f8e731387f75422df0e71.gz
This commit is contained in:
axel 2005-10-17 23:27:46 +10:00
parent 17c4835f08
commit d17f6b7ce4
2 changed files with 9 additions and 8 deletions

View File

@ -10,7 +10,7 @@ complete -y mount
#
# Find all mountpoints
#
complete -c umount -d "Mount point" -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -re "s/[0-9\.]*:\//\//"|grep "^/")'
complete -c umount -d "Mount point" -x -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -re "s/[0-9\.]*:\//\//"|grep "^/")'
complete -c umount -s V -d "Display version and exit"
complete -c umount -s h -d "Display help and exit"
@ -24,3 +24,4 @@ complete -c umount -s t -d "Actions should only be taken on file systems of the
complete -c umount -s O -d "Indicate that the actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cat /etc/mtab | cut -d " " -f 4)\t"Mount option"'
complete -c umount -s f -d "Force unmount (in case of an unreachable NFS system)"
complete -c umount -s l -d "Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy"

View File

@ -30,8 +30,10 @@ end
# without the description
#
#
# Find files that complete $argv[1], has the suffix $argv[2], and
# output them as completions with description $argv[3]
#
function __fish_complete_suffix -d "Complete using files"
@ -56,7 +58,8 @@ function __fish_complete_suffix -d "Complete using files"
end
#
# Find directories that complete $argv[1], output them as completions with description $argv[2] if defined, otherwise use 'Directory'
# Find directories that complete $argv[1], output them as completions
# with description $argv[2] if defined, otherwise use 'Directory'
#
function __fish_complete_directory -d "Complete using directories"
@ -143,8 +146,6 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
for i in $short_opt
# echo >&2 Test short option \'$i\'
if test -z $i
continue
end
@ -163,8 +164,6 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
continue
end
# echo >&2 Test long option $i
if contains -- --$i (commandline -cpo)
return 0
end
@ -232,8 +231,9 @@ function __fish_append -d "Internal completion function for appending string to
printf "%s\n" $str$argv $str$argv,
end
#Completions for SysV startup scripts
#
# Completions for SysV startup scripts
#
set -g __fish_service_commands '
start\t"Start service"