Skip to content

Commit

Permalink
refactor: converting to set rather than add
Browse files Browse the repository at this point in the history
Renaming to set to indicate we will not throw an error if it does already exist.

* #11
  • Loading branch information
DeveloperC286 committed Jan 27, 2024
1 parent 710ed1e commit 0050351
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zsh-simple-abbreviations
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ if [[ $# -eq 0 ]]; then
fi

case $1 in
--add)
--set)
if [[ $# -ne 3 ]]; then
echo "zsh_simple_abbreviations add sub-command requires a key and value."
echo "zsh_simple_abbreviations set sub-command requires a key and value."
return 1
fi

Expand Down Expand Up @@ -66,7 +66,7 @@ case $1 in
fi

for key in ${(ko)ZSH_SIMPLE_ABBREVIATIONS}; do
echo "zsh_simple_abbreviations --add ${key} '${ZSH_SIMPLE_ABBREVIATIONS[$key]}'"
echo "zsh_simple_abbreviations --set ${key} '${ZSH_SIMPLE_ABBREVIATIONS[$key]}'"
done
;;

Expand Down

0 comments on commit 0050351

Please sign in to comment.