Skip to content

Commit

Permalink
fix(rebase): correct syntax for removing an abbreviation
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Jan 12, 2020
1 parent d7275c8 commit f99834a
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 @@ -458,18 +458,18 @@ function abbr() {
fi

if $abbr_opt_global; then
if [ ${ABBRS_GLOBAL[(I)$1]} ]; then
if (( ${+ABBRS_GLOBAL[$1]} )); then
ABBRS_GLOBAL[$2]="${ABBRS_GLOBAL[$1]}"
unset ABBRS_GLOBAL["$1"]
unset "ABBRS_GLOBAL[${(b)1}]"
else
abbr_error " -r: No global abbreviation named $1"
fi
else
source "$ABBRS_UNIVERSAL_SCRATCH_FILE"

if [ ${ABBRS_UNIVERSAL[(I)$1]} ]; then
if (( ${+ABBRS_UNIVERSAL[$1]} )); then
ABBRS_UNIVERSAL[$2]="${ABBRS_UNIVERSAL[$1]}"
unset ABBRS_UNIVERSAL["$1"]
unset "ABBRS_UNIVERSAL[${(b)1}]"
abbr_sync_universal
else
abbr_error " -r: No universal abbreviation named $1"
Expand Down

0 comments on commit f99834a

Please sign in to comment.