Skip to content

Commit

Permalink
Update ssh.completion.sh ver6
Browse files Browse the repository at this point in the history
Further improvements. This will respect the usage of = as separator, and also use of whitespaces before and/or after =.
  • Loading branch information
jornodberg authored Dec 12, 2024
1 parent 437a579 commit 551f282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion completions/ssh.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function _omb_completion_ssh {
if ((${#config_files[@]} != 0)); then
COMPREPLY+=($(compgen -W "$(awk '
sub(/^[ \t]*[Hh][Oo][Ss][Tt]([Nn][Aa][Mm][Ee])?[ \t=]+/, "") {
n = split($0, fields, /[ \t]+/);
n = split($0, fields, /[ \t=]+/);
for (i = 1; i <= n; i++) if (fields[i] && !visited[fields[i]]++) print fields[i];
}' "${config_files[@]}")" "${options[@]}") )
fi
Expand Down

0 comments on commit 551f282

Please sign in to comment.