From 0050351da6b31102dc4255d82ba2e9c8719dd4b2 Mon Sep 17 00:00:00 2001 From: DeveloperC Date: Sat, 27 Jan 2024 00:13:17 +0000 Subject: [PATCH] refactor: converting to set rather than add Renaming to set to indicate we will not throw an error if it does already exist. * https://github.com/DeveloperC286/zsh-simple-abbreviations/issues/11 --- src/zsh-simple-abbreviations | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zsh-simple-abbreviations b/src/zsh-simple-abbreviations index 5889e79..53426e7 100644 --- a/src/zsh-simple-abbreviations +++ b/src/zsh-simple-abbreviations @@ -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 @@ -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 ;;