diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-04-01 10:26:19 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-04-01 10:27:52 +0200 |
commit | d472339e9a3fdec399ff5f9e94d3dcd03ffda6b5 (patch) | |
tree | 5c020db7167111c97f1423b3ea60eba2cf559c97 /cli/bash-completion.sh | |
parent | 80b33a6791eb2b31b12cd1790a60194dbc5de7cf (diff) |
Don't add trailing '/' when completing.
Diffstat (limited to 'cli/bash-completion.sh')
-rw-r--r-- | cli/bash-completion.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/bash-completion.sh b/cli/bash-completion.sh index f3175b9..4bb01b9 100644 --- a/cli/bash-completion.sh +++ b/cli/bash-completion.sh @@ -91,7 +91,7 @@ _icevault() { local trim= if [ "$cmd" = fill -a \( $OPTIND -eq $cword -o $(( $OPTIND + 1)) -eq $cword \) -a -z "$cur" ]; then - cur="$(icevault _geturi ${socket:+--socket="$socket"})"/ # get URI from webpage + cur="$( icevault _geturi ${socket:+--socket="$socket"} 2>/dev/null )"/ # get URI from webpage elif [ -z "$cmd" -a "$cword" -eq 1 -a "$cur" ]; then # autocomplete command COMPREPLY+=( $(compgen -W "$commands" -- "$cur") ) @@ -117,7 +117,6 @@ _icevault() { uri=$( echo "${uri#$trim}" | sed "s/[][\\{}*?~<>;'\"|&()\!$\` \t]/\\\\&/g" ) COMPREPLY+=( "$uri" ) done < <(icevault _complete -0 "$cur" 2>/dev/null) - [ "${#COMPREPLY[@]}" -eq 1 -a "${COMPREPLY[0]: -1:1}" = / ] && compopt -o nospace return 0 fi } |