36 lines
670 B
Bash
36 lines
670 B
Bash
#!/bin/zsh
|
|
case "$-" in
|
|
*i*)
|
|
;;
|
|
*)
|
|
# Shell is not interactive.
|
|
return 1
|
|
;;
|
|
esac
|
|
|
|
if [ -r /usr/local/etc/zshrc ]
|
|
then
|
|
. /usr/local/etc/zshrc
|
|
elif [ -r /etc/zshrc ]
|
|
then
|
|
. /etc/zshrc
|
|
fi
|
|
|
|
autoload -Uz compinit && compinit
|
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
|
|
|
bindkey -e
|
|
bindkey "^[[1;5C" forward-word
|
|
bindkey "^[[1;5D" backward-word
|
|
bindkey "^[[3~" delete-char
|
|
bindkey "^[[A" history-beginning-search-backward
|
|
bindkey "^[[B" history-beginning-search-forward
|
|
bindkey "^[OA" history-beginning-search-backward
|
|
bindkey "^[OB" history-beginning-search-forward
|
|
|
|
export PS1="%B%n@%m%#%b "
|
|
|
|
if [ -r "$HOME/.shrc" ]
|
|
then
|
|
emulate sh -c '. "$HOME/.shrc"'
|
|
fi
|