Skip to content

Commit

Permalink
修复自动补全多个ip匹配问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Vastxiao committed Jun 5, 2019
1 parent b771c18 commit 2ae7bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bash_env_load_complete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function _tmssh() {
if [[ $prev == tmssh ]] || [[ $prev == -* ]] || [[ $prev2 == -[npuisw] ]];then
source ${TMSSH_HOME%/}/lib/get_hosts_data.sh groups
COMPREPLY=( $(compgen -W "$TMSSH_GROUPS" -- ${cur}) )
elif [[ "$prev2" != "-l" ]];then
elif [[ "$prev2" != "-l" ]] && ! [[ $prev =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]];then
TMSSH_GROUP=$prev
source ${TMSSH_HOME%/}/lib/get_hosts_data.sh group_hosts
COMPREPLY=( $(compgen -W "$(echo -e "${TMSSH_GROUP_HOSTS}" |sed 's@[[:space:]].*$@@;s@/.*$@@')" -- ${cur}) )
Expand Down

0 comments on commit 2ae7bfe

Please sign in to comment.