Skip to content

Commit

Permalink
fix(history): fix confirmation prompt to allow bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Jun 18, 2024
1 parent 373a1fd commit c83ca51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/history.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ function omz_history {

# confirm action before deleting history
print -nu2 "This action will irreversibly delete your command history. Are you sure? [y/N] "
builtin read -k1
[[ "$REPLY" = $'\n' ]] || print -u2
[[ "$REPLY" != ([yY]) ]] && return 0
builtin read
[[ "$REPLY" = [yY] ]] || return 0

print -nu2 >| "$HISTFILE"
fc -p "$HISTFILE"
Expand Down

0 comments on commit c83ca51

Please sign in to comment.