diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index 6e6f79a0a..476dd7cee 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -125,7 +125,7 @@ using_id() { if [ -n "$cmd" ]; then output=$($cmd -P $USER 2>/dev/null) if [ $? = 0 ]; then - login_shell=$(echo $output | cut -d: -f7); + login_shell=$(echo $output | grep -o '[^:]*$'); if login_shell_is_ok; then return 0; fi fi fi @@ -137,7 +137,7 @@ using_passwd() { if [ -n "$cmd" ]; then output=$($cmd "^$USER:" /etc/passwd 2>/dev/null) if [ $? = 0 ]; then - login_shell=$(echo $output | cut -d: -f7); + login_shell=$(echo $output | grep -o '[^:]*$'); if login_shell_is_ok; then return 0; fi fi fi