diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2009-12-13 11:31:06 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2009-12-13 11:31:06 +0200 |
commit | b72a0f6e26ce5d2cb4253c8095c6ff39af4f08df (patch) | |
tree | 57586131d191112541a0057f0d2fb45206bbe5d5 /bash_completion | |
parent | 798bd2328eaaad06d77bfe90f32b87dd39846693 (diff) | |
download | bash-completion-b72a0f6e26ce5d2cb4253c8095c6ff39af4f08df.tar.gz |
Get rid of one unnecessary local variable.
Diffstat (limited to 'bash_completion')
-rw-r--r-- | bash_completion | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bash_completion b/bash_completion index 9b298536..3e65dd6a 100644 --- a/bash_completion +++ b/bash_completion @@ -1225,7 +1225,7 @@ _known_hosts() _known_hosts_real() { local configfile flag prefix - local cur curd awkcur user suffix aliases hosts i host + local cur curd awkcur user suffix aliases i host local -a kh khd config local OPTIND=1 @@ -1347,9 +1347,8 @@ _known_hosts_real() fi # append any available aliases from config files if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then - local host_aliases=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\?$/\2/p' "${config[@]}" ) - hosts=$( compgen -W "$host_aliases" -- "$cur" ) - COMPREPLY=( "${COMPREPLY[@]}" $hosts ) + local hosts=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\?$/\2/p' "${config[@]}" ) + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$hosts" -- "$cur" ) ) fi # Add hosts reported by avahi, if it's available |