mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-24 21:07:26 +08:00
Minor completion updates for umount
darcs-hash:20051017132746-ac50b-4f69deeeed995370e35f8e731387f75422df0e71.gz
This commit is contained in:
parent
17c4835f08
commit
d17f6b7ce4
@ -10,7 +10,7 @@ complete -y mount
|
|||||||
#
|
#
|
||||||
# Find all mountpoints
|
# 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 V -d "Display version and exit"
|
||||||
complete -c umount -s h -d "Display help 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 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 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"
|
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"
|
||||||
|
|
||||||
|
@ -30,8 +30,10 @@ end
|
|||||||
# without the description
|
# without the description
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
# Find files that complete $argv[1], has the suffix $argv[2], and
|
# Find files that complete $argv[1], has the suffix $argv[2], and
|
||||||
# output them as completions with description $argv[3]
|
# output them as completions with description $argv[3]
|
||||||
|
#
|
||||||
|
|
||||||
function __fish_complete_suffix -d "Complete using files"
|
function __fish_complete_suffix -d "Complete using files"
|
||||||
|
|
||||||
@ -56,7 +58,8 @@ function __fish_complete_suffix -d "Complete using files"
|
|||||||
end
|
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"
|
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
|
for i in $short_opt
|
||||||
|
|
||||||
# echo >&2 Test short option \'$i\'
|
|
||||||
|
|
||||||
if test -z $i
|
if test -z $i
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
@ -163,8 +164,6 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
|
|||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
# echo >&2 Test long option $i
|
|
||||||
|
|
||||||
if contains -- --$i (commandline -cpo)
|
if contains -- --$i (commandline -cpo)
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
@ -232,8 +231,9 @@ function __fish_append -d "Internal completion function for appending string to
|
|||||||
printf "%s\n" $str$argv $str$argv,
|
printf "%s\n" $str$argv $str$argv,
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
#Completions for SysV startup scripts
|
# Completions for SysV startup scripts
|
||||||
|
#
|
||||||
|
|
||||||
set -g __fish_service_commands '
|
set -g __fish_service_commands '
|
||||||
start\t"Start service"
|
start\t"Start service"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user