Tarrasch / zsh-autoenv

Autoenv for zsh
700 stars 30 forks source link

Fix stashing aliases with a space in double quotes #102

Open tothpeter opened 5 months ago

tothpeter commented 5 months ago

The problem

eval "__varstash_alias__$stash_name=\"$alias_def\"" crashes in lib/varstash:111 when I want to stash an alias like alias some_alias='echo "ORIG ALIAS"'.

The problem occurs when we have a space inside double quotes in the alias.

The fix

Escape double quotes.