Skip to content

Commit fe5487a

Browse files
MPLew-isguenhter
authored andcommitted
Fix bash compatibility
The use of zsh `&!` syntax was causing bash to die in script parsing, even though this never gets executed. This adds `true` as a dummy command to get past parsing and allow both bash and zsh to execute the script.
1 parent 3930480 commit fe5487a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitprompt.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function async_run() {
1212
function async_run_zsh() {
1313
{
1414
eval "$@" &> /dev/null
15-
}&!
15+
16+
# `true` is used here to allow bash to parse the script, as the zsh `&!` syntax will otherwise stop parsing prior to any execution.
17+
}&! true
1618
}
1719

1820

0 commit comments

Comments
 (0)