5555
5656unsetopt menu_complete
5757unsetopt flowcontrol
58- setopt prompt_subst
5958setopt auto_menu
6059setopt complete_in_word
6160setopt always_to_end
6261setopt auto_pushd
63- zmodload -i zsh/complist
64-
65- zstyle ' :completion:*' matcher-list ' m:{a-zA-Z}={A-Za-z}' ' r:|[._-]=* r:|=*' ' l:|=* r:|=*'
66- zstyle ' :completion:*' list-colors ' '
67- zstyle ' :completion:*' special-dirs true
68- zstyle ' :completion:*:cd:*' tag-order local-directories directory-stack path-directories
69- zstyle ' :completion::complete:*' use-cache 1
70- zstyle ' :completion::complete:*' cache-path $ZSH /cache/
71- zstyle ' :completion:*:*:*:*:*' menu select
72-
73- zstyle ' :completion:*:*:kill:*:processes' list-colors ' =(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
74- zstyle ' :completion:*:*:*:*:processes' command " ps -u ` whoami` -o pid,user,comm -w -w"
75-
76- # use /etc/hosts and known_hosts for hostname completion
77- [ -r ~ /.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)" $( < $HOME /.ssh/known_hosts) " } :# [\|]* } %% \ * } %% ,* } ) || _ssh_hosts=()
78- [ -r ~ /.ssh/config ] && _ssh_config=($( cat ~ /.ssh/config | sed -ne ' s/Host[=\t ]//p' ) ) || _ssh_config=()
79- [ -r /etc/hosts ] && : ${(A)_etc_hosts:= ${(s: : )${(ps: \t : )${${(f)~~" $( < /etc/hosts) " } %% \# * } ## [:blank:]# [^[:blank:]]# } } } || _etc_hosts=()
80- hosts=(
81- " $_ssh_config [@]"
82- " $_global_ssh_hosts [@]"
83- " $_ssh_hosts [@]"
84- " $_etc_hosts [@]"
85- " $HOST "
86- localhost
87- )
88- zstyle ' :completion:*:hosts' hosts $hosts
89- zstyle ' :completion:*' users off
62+ # zmodload -i zsh/complist
63+ #
64+ # zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
65+ # zstyle ':completion:*' list-colors ''
66+ # zstyle ':completion:*' special-dirs true
67+ # zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
68+ # zstyle ':completion::complete:*' use-cache 1
69+ # zstyle ':completion::complete:*' cache-path $ZSH/cache/
70+ # zstyle ':completion:*:*:*:*:*' menu select
71+ #
72+ # zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
73+ # zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
74+ #
75+ # # use /etc/hosts and known_hosts for hostname completion
76+ # [ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
77+ # [ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=()
78+ # [ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
79+ # hosts=(
80+ # "$_ssh_config[@]"
81+ # "$_global_ssh_hosts[@]"
82+ # "$_ssh_hosts[@]"
83+ # "$_etc_hosts[@]"
84+ # "$HOST"
85+ # localhost
86+ # )
87+ # zstyle ':completion:*:hosts' hosts $hosts
88+ # zstyle ':completion:*' users off
9089
9190# ##############
9291# KEY BINDINGS
@@ -138,7 +137,8 @@ bindkey '^E' end-of-line
138137# Aliases
139138# ########
140139
141- local aliasfile=" ${HOME} /.zsh.d/aliases.` uname` .sh"
140+ local machine_name=$( uname)
141+ local aliasfile=" ${HOME} /.zsh.d/aliases.${machine_name} .sh"
142142if [ -r ${aliasfile} ]; then
143143 source ${aliasfile}
144144fi
@@ -241,6 +241,8 @@ s3() {
241241# PROMPT
242242# ########
243243
244+ setopt prompt_subst
245+
244246git_prompt_info () {
245247 local dirstatus=" OK"
246248 local dirty=" %{$fg_bold [red]%} X%{$reset_color %}"
357359 export GIT_EDITOR=' vim'
358360fi
359361
360- local envfile=" ${HOME} /.zsh.d/env.` uname ` .sh"
362+ local envfile=" ${HOME} /.zsh.d/env.${machine_name} .sh"
361363if [ -r ${envfile} ]; then
362364 . ${envfile}
363365fi
@@ -372,22 +374,15 @@ export KEYTIMEOUT=1
372374# homebrew
373375export PATH=" /usr/local/bin:$PATH "
374376
375- # rbenv
376- if which rbenv & > /dev/null; then
377- export PATH=" $HOME /.rbenv/bin:$PATH "
378- eval " $( rbenv init - --no-rehash) "
379- fi
380-
381377# asdf
382- if [ -f /usr/local/opt/asdf/asdf.sh ]; then
383- source /usr/local/opt/asdf/asdf.sh
384- fi
385-
378+ # if [ -f /usr/local/opt/asdf/asdf.sh ]; then
379+ # source /usr/local/opt/asdf/asdf.sh
380+ # fi
381+ #
386382if [ -f ~ /.asdf/asdf.sh ]; then
387383 source ~ /.asdf/asdf.sh
388384fi
389385
390-
391386# Encoding problems with gem
392387export LC_ALL=en_US.UTF-8
393388export LANG=en_US.UTF-8
@@ -416,12 +411,12 @@ if [ -e /usr/local/opt/fzf/shell/completion.zsh ]; then
416411fi
417412
418413# fzf via local installation
419- if [[ ! " $PATH " == * /home/mrnugget/ .fzf/bin* ]]; then
420- export PATH=" $PATH :/home/mrnugget /.fzf/bin"
414+ if [[ ! " $PATH " == * $HOME .fzf/bin* ]]; then
415+ export PATH=" $PATH :$HOME /.fzf/bin"
421416fi
422417if [ -e ~ /.fzf ]; then
423418 source ~ /.fzf/shell/key-bindings.zsh
424- source ~ /.fzf/shell/completion.zsh
419+ # source ~/.fzf/shell/completion.zsh
425420fi
426421
427422if which fzf & > /dev/null && which rg & > /dev/null; then
@@ -431,25 +426,6 @@ if which fzf &> /dev/null && which rg &> /dev/null; then
431426 set_fzf_default_opts
432427fi
433428
434- # rust
435- export PATH=" $HOME /.cargo/bin:$PATH "
436- if which rustc & > /dev/null; then
437- export RUST_SRC_PATH=" $( rustc --print sysroot) /lib/rustlib/src/rust/src"
438- fi
439-
440- # python
441- if which pyenv & > /dev/null; then
442- eval " $( pyenv init -) "
443- export PATH=" $HOME /.local/bin:$PATH "
444- fi
445-
446- # Deactive this until this is fixed: https://github.com/BurntSushi/ripgrep/issues/375
447- if which rg & > /dev/null; then
448- compdef -d rg
449- alias gr=' rg' # Because in Vim you `:gr[ep]`
450- fi
451- # export PATH="/usr/local/opt/curl/bin:$PATH"
452-
453429# Try out `z`
454430if [ -e /usr/local/etc/profile.d/z.sh ]; then
455431 source /usr/local/etc/profile.d/z.sh
@@ -462,9 +438,6 @@ if which bat &> /dev/null; then
462438 alias cat=bat
463439fi
464440
465- # opam configuration
466- test -r $HOME /.opam/opam-init/init.zsh && . $HOME /.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
467-
468441# Export my personal ~/bin as last one to have highest precedence
469442export PATH=" $HOME /bin:$PATH "
470443
0 commit comments