From 40a681d87b6991aee05cc473df5e0ebe54f1e647 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 15 Sep 2009 10:38:45 +0000 Subject: [PATCH] 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 --- sshfs-mapper.completion | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sshfs-mapper.completion b/sshfs-mapper.completion index d365127..06ae755 100644 --- a/sshfs-mapper.completion +++ b/sshfs-mapper.completion @@ -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