[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 5d691d48269e14433aec7e4482b3215ad7e24a14
Ville Skyttä
ville.skytta at iki.fi
Sun Dec 13 09:52:33 UTC 2009
The following commit has been merged in the master branch:
commit b72a0f6e26ce5d2cb4253c8095c6ff39af4f08df
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Dec 13 11:31:06 2009 +0200
Get rid of one unnecessary local variable.
diff --git a/bash_completion b/bash_completion
index 9b29853..3e65dd6 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
--
bash-completion
More information about the Bash-completion-commits
mailing list