mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
tools/uninstall: Pass -v
to unset
to avoid ambiguity
`unset -v` is standardized in POSIX.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user