- _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:
ianmacd 2002-04-03 16:56:01 +00:00
parent d8c6a7e609
commit 6392b218d2

View File

@ -1,6 +1,6 @@
# 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>
#
@ -314,11 +314,11 @@ _umount()
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $( mount | cut -d' ' -f 3 | grep ^$cur ) )
COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) )
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
# /etc/fstab, unless the word being completed contains a ':', which