From 2a4a1d4c5e754d3e6f811f6aedc3fab0fd42dce1 Mon Sep 17 00:00:00 2001 From: April King Date: Thu, 26 Mar 2020 12:52:48 -0500 Subject: [PATCH] Fix detection of maws_profile in PS1 in zsh --- mozilla_aws_cli/role_picker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla_aws_cli/role_picker.py b/mozilla_aws_cli/role_picker.py index e9affec..b94f57a 100644 --- a/mozilla_aws_cli/role_picker.py +++ b/mozilla_aws_cli/role_picker.py @@ -21,7 +21,7 @@ fi } -if [ -n "${PS1##*\$(maws_profile)*}" ]; then +if test "${PS1#*\$\(maws_profile\)}" = "$PS1"; then # maws_profile is missing from PS1 if [ "${PS1%\$ }" != "${PS1}" ]; then PS1="${PS1%\$ }\$(maws_profile)\$ "