sshfs-mapper: Fix completion ( map names were not correctly completed )

git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1432 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
Glenn Y. Rolland 2009-09-15 10:38:45 +00:00
parent e04b9075d0
commit 40a681d87b

View file

@ -2,7 +2,7 @@
_sshfsmapper_opts()
{
local cur prev sshfsmapper_opts
local cur prev sshfsmapper_opts sshfsmapper_maps
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
@ -13,7 +13,8 @@ _sshfsmapper_opts()
COMPREPLY=( $( compgen -W "$sshfsmapper_opts" -- $cur ) )
else
if [[ "$prev" == -s ]]; then
COMPREPLY=( $( sshfs-mapper -l 2> /dev/null ) )
sshfsmapper_maps=$( sshfs-mapper -l 2> /dev/null )
COMPREPLY=( $( compgen -W "$sshfsmapper_maps" -- $cur ) )
else
COMPREPLY=( $( compgen -W "$sshfsmapper_opts" -- $cur ) )
fi