diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2024-09-21 13:59:50 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2024-09-21 13:59:50 +0900 |
| commit | 1f8343e132d8f71650f31c8ba131643442c8ac88 (patch) | |
| tree | ca6fed7392bd6b7aae737a34d391182950adc302 | |
| parent | 8404644c6e0e81e3c25e8ea6ede02d27273c2bcb (diff) | |
minor tweak for updating default editor function
| -rwxr-xr-x | copy.sh | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 |
