aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2024-09-21 13:59:50 +0900
committerJaKooLit <ejhay.games@gmail.com>2024-09-21 13:59:50 +0900
commit1f8343e132d8f71650f31c8ba131643442c8ac88 (patch)
treeca6fed7392bd6b7aae737a34d391182950adc302
parent8404644c6e0e81e3c25e8ea6ede02d27273c2bcb (diff)
minor tweak for updating default editor function
-rwxr-xr-xcopy.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/copy.sh b/copy.sh
index 6f0bd3ac..3d6993a7 100755
--- a/copy.sh
+++ b/copy.sh
@@ -201,22 +201,23 @@ printf "\n"
update_editor() {
local editor=$1
sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" config/hypr/UserConfigs/ENVariables.conf
- echo "${OK} Default editor set to $editor." 2>&1 | tee -a "$LOG"
+ echo "${OK} Default editor set to ${ORANGE}$editor${RESET}." 2>&1 | tee -a "$LOG"
}
# Check for neovim if installed
if command -v nvim &> /dev/null; then
- printf "${NOTE} neovim is detected as installed\n"
- read -p "${CAT} Do you want to make neovim the default editor? (y/n): " EDITOR_CHOICE
+ printf "${NOTE} ${ORANGE}neovim${RESET} is detected as installed\n"
+ read -p "${CAT} Do you want to make ${ORANGE}neovim${RESET} the default editor? (y/n): " EDITOR_CHOICE
if [[ "$EDITOR_CHOICE" == "y" ]]; then
update_editor "nvim"
+ exit 0
fi
fi
# Check for vim if installed
if command -v vim &> /dev/null; then
- printf "${NOTE} vim is detected as installed\n"
- read -p "${CAT} Do you want to make vim the default editor? (y/n): " EDITOR_CHOICE
+ printf "${NOTE} ${ORANGE}vim${RESET} is detected as installed\n"
+ read -p "${CAT} Do you want to make ${ORANGE}vim${RESET} the default editor? (y/n): " EDITOR_CHOICE
if [[ "$EDITOR_CHOICE" == "y" ]]; then
update_editor "vim"
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage