mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-11-11 11:11:50 -05:00
fix(updater): accept Korean IME 'ㅛ' as yes in update prompt (#13791)
On the Korean Dubeolsik keyboard layout, the Y key position produces ㅛ (U+315B) when a Korean IME is active. Since the update confirmation prompt only matched [yY$'\n'], Korean users who pressed the Y key with the IME on had their update silently cancelled. Accept ㅛ as an affirmative answer.
This commit is contained in:
@@ -274,11 +274,14 @@ function handle_update() {
|
|||||||
|
|
||||||
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
||||||
# Otherwise just show a reminder for how to update
|
# Otherwise just show a reminder for how to update
|
||||||
|
# ㅛ (U+315B) is the character produced at the Y key position on the Korean
|
||||||
|
# Dubeolsik layout, so it is accepted too to avoid cancelling the update
|
||||||
|
# when a Korean IME is active.
|
||||||
printf "[oh-my-zsh] Would you like to update? [Y/n] "
|
printf "[oh-my-zsh] Would you like to update? [Y/n] "
|
||||||
read -r -k 1 option
|
read -r -k 1 option
|
||||||
[[ "$option" = $'\n' ]] || echo
|
[[ "$option" = $'\n' ]] || echo
|
||||||
case "$option" in
|
case "$option" in
|
||||||
[yY$'\n']) update_ohmyzsh ;;
|
[yY$'\n']|$'ㅛ') update_ohmyzsh ;;
|
||||||
[nN]) update_last_updated_file ;&
|
[nN]) update_last_updated_file ;&
|
||||||
*) echo "[oh-my-zsh] You can update manually by running \`omz update\`" ;;
|
*) echo "[oh-my-zsh] You can update manually by running \`omz update\`" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user