Improve zsh behaviour
This commit is contained in:
parent
87e3fd03ca
commit
40532e1bc6
1 changed files with 39 additions and 27 deletions
|
@ -15,6 +15,9 @@ then
|
|||
alias shopt=false
|
||||
fi
|
||||
|
||||
if [ -n "$BASH_VERSION" ]
|
||||
then
|
||||
|
||||
if [ -f /etc/bashrc ]
|
||||
then
|
||||
. /etc/bashrc
|
||||
|
@ -34,6 +37,8 @@ then
|
|||
complete -F _quilt_completion -o filenames dquilt
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
_acp_add_path () {
|
||||
if ! [[ ":$PATH:" =~ ":$1:" ]] && test -d "$1"
|
||||
then
|
||||
|
@ -88,7 +93,7 @@ export PAPERSIZE=a4
|
|||
export POWERSHELL_TELEMETRY_OPTOUT=1
|
||||
export PYTHONWARNINGS=ignore::UserWarning
|
||||
|
||||
if [ "x$(uname -s)" = "xDarwin" ]
|
||||
if [ x$(uname -s) = xDarwin ]
|
||||
then
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
fi
|
||||
|
@ -115,6 +120,8 @@ then
|
|||
export QT_FONT_DPI=72
|
||||
fi
|
||||
|
||||
if [ -n "$BASH_VERSION" ]
|
||||
then
|
||||
shopt -s histappend
|
||||
bind '"\e[1;5C": forward-word'
|
||||
bind '"\e[1;5D": backward-word'
|
||||
|
@ -123,17 +130,22 @@ bind '"\e[B": history-search-forward'
|
|||
bind 'set bell-style none'
|
||||
bind 'set completion-ignore-case on'
|
||||
bind 'set enable-bracketed-paste off'
|
||||
|
||||
if [ -n "$ZSH_VERSION" ]
|
||||
elif [ -n "$ZSH_VERSION" ]
|
||||
then
|
||||
bindkey "^[[A" history-beginning-search-backward
|
||||
bindkey "^[[B" history-beginning-search-forward
|
||||
fi
|
||||
|
||||
# Set the prompt for various shells. The prompt should look like "user@host$ "
|
||||
# or similar, except for the fallback of "$ " for anything it can't detect.
|
||||
if [ -n "$BASH_VERSION" ]
|
||||
then
|
||||
export PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] "
|
||||
if [ -n "$ZSH_VERSION" ]
|
||||
elif [ -n "$ZSH_VERSION" ]
|
||||
then
|
||||
export PS1="%B%n@%m%#%b "
|
||||
else
|
||||
export PS1="$ "
|
||||
fi
|
||||
|
||||
if test $(id -u) -ne 0 && test -x /usr/bin/dnf
|
||||
|
|
Loading…
Reference in a new issue