From 5b0e804c6b18418952590923aa8bca8796cd2304 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 1 Aug 2023 17:35:36 +0900 Subject: [PATCH] tools/uninstall: Pass `-v` to `unset` to avoid ambiguity `unset -v` is standardized in POSIX. --- tools/uninstall.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/uninstall.sh b/tools/uninstall.sh index 2315f02..98d0d59 100755 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -47,11 +47,11 @@ _omb_uninstall_find_bashrc_original() { _omb_uninstall_confirmation "Are you sure you want to remove Oh My Bash? [y/N]" if [ "$_omb_uninstall_confirmation" != y ] && [ "$_omb_uninstall_confirmation" != Y ]; then printf '%s\n' "Uninstall cancelled" - unset _omb_uninstall_confirmation + unset -v _omb_uninstall_confirmation # shellcheck disable=SC2317 return 0 2>/dev/null || exit 0 fi -unset _omb_uninstall_confirmation +unset -v _omb_uninstall_confirmation if [ -d ~/.oh-my-bash ]; then printf '%s\n' "Removing ~/.oh-my-bash" @@ -67,7 +67,7 @@ if ! _omb_uninstall_contains_omb ~/.bashrc; then printf '%s\n' "uninstall: The original config was found at '$_omb_uninstall_bashrc_original'." >&2 fi printf '%s\n' "uninstall: Canceled." >&2 - unset _omb_uninstall_bashrc_original + unset -v _omb_uninstall_bashrc_original # shellcheck disable=SC2317 return 1 2>/dev/null || exit 1 fi @@ -88,8 +88,8 @@ else command mv ~/.bashrc.omb-temp ~/.bashrc fi -unset _omb_uninstall_bashrc_original -unset _omb_uninstall_bashrc_uninstalled +unset -v _omb_uninstall_bashrc_original +unset -v _omb_uninstall_bashrc_uninstalled echo "Thanks for trying out Oh My Bash. It has been uninstalled." case $- in