- _umount(): make returned completions behave properly (remove -o filenames)
and default to directories if all else fails (add -o dirnames)
This commit is contained in:
parent
d8c6a7e609
commit
6392b218d2
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05a
|
# bash_completion - some programmable completion functions for bash 2.05a
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.250 2002/04/03 07:11:06 ianmacd Exp $
|
# $Id: bash_completion,v 1.251 2002/04/03 18:56:01 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -314,11 +314,11 @@ _umount()
|
|||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
|
||||||
COMPREPLY=( $( mount | cut -d' ' -f 3 | grep ^$cur ) )
|
COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) )
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
complete -F _umount -o filenames umount
|
complete -F _umount -o dirnames umount
|
||||||
|
|
||||||
# mount(8) completion. This will pull a list of possible mounts out of
|
# mount(8) completion. This will pull a list of possible mounts out of
|
||||||
# /etc/fstab, unless the word being completed contains a ':', which
|
# /etc/fstab, unless the word being completed contains a ':', which
|
||||||
|
Loading…
x
Reference in New Issue
Block a user