refactor: Avoid if statements with double quotes and use single quotes instead to improve portability of plugin
This commit is contained in:
parent
ad59ebcf3a
commit
b908ce803b
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ parse_ssh_config() {
|
||||||
}' $1`; do
|
}' $1`; do
|
||||||
local host_regex=${ssh_config%|*}
|
local host_regex=${ssh_config%|*}
|
||||||
local host_user=${ssh_config#*|}
|
local host_user=${ssh_config#*|}
|
||||||
if [[ "$2" == $host_regex ]]; then
|
if [ "$2" == "$host_regex" ]; then
|
||||||
ssh_user_found=$host_user
|
ssh_user_found=$host_user
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -111,7 +111,7 @@ main() {
|
||||||
user=$(get_info whoami)
|
user=$(get_info whoami)
|
||||||
|
|
||||||
# Only show port info if ssh session connected (no localhost) and option enabled
|
# Only show port info if ssh session connected (no localhost) and option enabled
|
||||||
if $(ssh_connected) && [[ $show_ssh_session_port == "true" ]] ; then
|
if $(ssh_connected) && [ "$show_ssh_session_port" == "true" ] ; then
|
||||||
port=$(get_info port)
|
port=$(get_info port)
|
||||||
echo $user@$hostname:$port
|
echo $user@$hostname:$port
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue