Skip to content

Commit

Permalink
fix(quotation marks): unsetting assoc array element requires quotes...
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 5, 2020
1 parent 544cf5b commit 22336be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zsh-abbr.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ _zsh_abbr() {
if [[ $type == 'global' ]]; then
if (( ${+ZSH_ABBR_SESSION_GLOBALS[$abbreviation]} )); then
if ! (( dry_run )); then
unset ZSH_ABBR_SESSION_GLOBALS[${(b)abbreviation}]
unset "ZSH_ABBR_SESSION_GLOBALS[${(b)abbreviation}]" # quotation marks required
fi

success=1
fi
elif (( ${+ZSH_ABBR_SESSION_COMMANDS[$abbreviation]} )); then
if ! (( dry_run )); then
unset ZSH_ABBR_SESSION_COMMANDS[${(b)abbreviation}]
unset "ZSH_ABBR_SESSION_COMMANDS[${(b)abbreviation}]" # quotation marks required
fi

success=1
Expand All @@ -103,7 +103,7 @@ _zsh_abbr() {

if (( ${+ZSH_ABBR_USER_GLOBALS[$abbreviation]} )); then
if ! (( dry_run )); then
unset ZSH_ABBR_USER_GLOBALS[${(b)abbreviation}]
unset "ZSH_ABBR_USER_GLOBALS[${(b)abbreviation}]" # quotation marks required
_zsh_abbr:util_sync_user
fi

Expand All @@ -114,7 +114,7 @@ _zsh_abbr() {

if (( ${+ZSH_ABBR_USER_COMMANDS[$abbreviation]} )); then
if ! (( dry_run )); then
unset ZSH_ABBR_USER_COMMANDS[${(b)abbreviation}]
unset "ZSH_ABBR_USER_COMMANDS[${(b)abbreviation}]" # quotation marks required
_zsh_abbr:util_sync_user
fi

Expand Down

0 comments on commit 22336be

Please sign in to comment.