mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-07-13 13:55:49 +00:00
update zsh configs
This commit is contained in:
@ -77,7 +77,7 @@ setopt autocd
|
||||
|
||||
# correct
|
||||
setopt CORRECT_ALL
|
||||
SPROMPT="Correct '%R' to '%r' ? ([Y]es/[N]o/[E]dit/[A]bort) "
|
||||
SPROMPT="Correct '%R' to '%r' ? (nyae) "
|
||||
|
||||
# append history
|
||||
setopt APPEND_HISTORY
|
||||
@ -121,7 +121,7 @@ else
|
||||
%{$fg_bold[yellow]%}%1/%{$reset_color%}\
|
||||
%{$fg_bold[white]%}]$ %{$reset_color%}"
|
||||
fi
|
||||
precmd () {
|
||||
precmd() {
|
||||
# last command
|
||||
returncode="%(?.%{$fg[green]%}.%{$fg[red]%})%?%{$resetcolor%}"
|
||||
RPROMPT="%{$fg_bold[white]%}[%{$reset_color%}\
|
||||
@ -140,7 +140,7 @@ alias less='vimpager'
|
||||
alias zless='vimpager'
|
||||
rm() {
|
||||
# error check
|
||||
[ $# -eq 0 ] && { echo "Files are not set!"; return 1 }
|
||||
[ $# -eq 0 ] && { echo "Files are not set"; return 1 }
|
||||
echo "$@" | grep -qe '-h\|--help' && { echo "Usage: rm FILE..."; return 0 }
|
||||
echo "$@" | grep -q "-" && echo "Warning: this function doesn't support any flags"
|
||||
# set trash path
|
||||
@ -156,7 +156,7 @@ rm() {
|
||||
done
|
||||
# confirm
|
||||
CONFIRM=""
|
||||
echo -n "You realy want to remove '$@'? [y/n] "; read -k1 CONFIRM; echo
|
||||
echo -n "Do you realy want to remove '$@'? [ny] "; read -k1 CONFIRM; echo
|
||||
[[ ! $CONFIRM =~ [yY] ]] && return 1
|
||||
# move
|
||||
for FILE in "$@"; do
|
||||
|
Reference in New Issue
Block a user