From b908ce803b8575206e3a66097348f29b78f9c4e1 Mon Sep 17 00:00:00 2001 From: AbelAnaya Date: Tue, 14 Nov 2023 23:17:38 +0100 Subject: [PATCH] refactor: Avoid if statements with double quotes and use single quotes instead to improve portability of plugin --- scripts/ssh_session.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ssh_session.sh b/scripts/ssh_session.sh index acc3614..92daba5 100755 --- a/scripts/ssh_session.sh +++ b/scripts/ssh_session.sh @@ -31,7 +31,7 @@ parse_ssh_config() { }' $1`; do local host_regex=${ssh_config%|*} local host_user=${ssh_config#*|} - if [[ "$2" == $host_regex ]]; then + if [ "$2" == "$host_regex" ]; then ssh_user_found=$host_user break fi @@ -111,7 +111,7 @@ main() { user=$(get_info whoami) # 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) echo $user@$hostname:$port else