-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape wildcards in shell code #17
Comments
Fixed in bash with 835afbf . |
dolmen
added a commit
that referenced
this issue
Feb 5, 2016
As the shell code we generate is evaluated in $( ... ), it is subject to word splitting and pathname expansion. In the code of the angel function we have a case...esac block which has the *) entry. This 'word' was expanded if the current directory contained a filename ending with ')'. For example: touch '(aaa GH17)' eval $(angel-PS1) So we use a trick to escape pathname expansion. The line: *) becomes: ''*)
dolmen
added a commit
that referenced
this issue
Feb 5, 2016
dolmen
added a commit
that referenced
this issue
Feb 5, 2016
Zsh 5.0.2 does not show the behaviour we have in bash dans dash, but we preventively add the same fix as for the other shells.
Zsh 5.0.2 does not seem to have yet the behaviour seen in bash and dash. But I preventively applied the fix also for that shell in 1a701be . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shell code generated is evaluated with
eval $(angel-PS1)
as indicated in the documentation.Due to the use of
$( ... )
, this code is subject to wildard expansion. And we have a wildcard in thecase ... esac
block of the bash code.Try this in bash:
=> The "*)" in the shell code is expanded.
A better demonstration of the issue:
The text was updated successfully, but these errors were encountered: