diff --git a/hooks/shell-interactive/00-oh-my.zsh b/hooks/shell-interactive/00-oh-my.zsh new file mode 100644 index 0000000..60d8a11 --- /dev/null +++ b/hooks/shell-interactive/00-oh-my.zsh @@ -0,0 +1,48 @@ +export ZSH="$MUREX/modules/oh-my-zsh" +ZSH_THEME="oh-my" +plugins=( + command-not-found + dirhistory + git + git-flow + jsontools + mvn + python + redis-cli + sudo + systemd + zsh-syntax-highlighting + zsh-autosuggestions + history-substring-search + yarn-autocompletions +) + +if [ "$(whoami)" = "root" ]; then + ZSH_DISABLE_COMPFIX=true +fi + +. "$ZSH/oh-my-zsh.sh" + +autoload bashcompinit +bashcompinit + +command_not_found_handler () { + [[ -x /usr/lib/command-not-found ]] || return 1 + /usr/lib/command-not-found -- ${1+"$1"} && : +} + +preexec() { + timer=${timer:-$SECONDS} +} + +#precmd() { +# if [ "${timer}" ]; then +# timer_show="$((${SECONDS} - ${timer}))" +# timer_show=$(printf '%.*f\n' 3 $timer_show) +# export RPROMPT="[code: %F{red}%?%f, time: %F{yellow}${timer_show}s%f]" +# unset timer +# fi +#} + +unalias ls +unalias ll