55
55
56
56
unsetopt menu_complete
57
57
unsetopt flowcontrol
58
- setopt prompt_subst
59
58
setopt auto_menu
60
59
setopt complete_in_word
61
60
setopt always_to_end
62
61
setopt 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
90
89
91
90
# ##############
92
91
# KEY BINDINGS
@@ -138,7 +137,8 @@ bindkey '^E' end-of-line
138
137
# Aliases
139
138
# ########
140
139
141
- local aliasfile=" ${HOME} /.zsh.d/aliases.` uname` .sh"
140
+ local machine_name=$( uname)
141
+ local aliasfile=" ${HOME} /.zsh.d/aliases.${machine_name} .sh"
142
142
if [ -r ${aliasfile} ]; then
143
143
source ${aliasfile}
144
144
fi
@@ -241,6 +241,8 @@ s3() {
241
241
# PROMPT
242
242
# ########
243
243
244
+ setopt prompt_subst
245
+
244
246
git_prompt_info () {
245
247
local dirstatus=" OK"
246
248
local dirty=" %{$fg_bold [red]%} X%{$reset_color %}"
357
359
export GIT_EDITOR=' vim'
358
360
fi
359
361
360
- local envfile=" ${HOME} /.zsh.d/env.` uname ` .sh"
362
+ local envfile=" ${HOME} /.zsh.d/env.${machine_name} .sh"
361
363
if [ -r ${envfile} ]; then
362
364
. ${envfile}
363
365
fi
@@ -372,22 +374,15 @@ export KEYTIMEOUT=1
372
374
# homebrew
373
375
export PATH=" /usr/local/bin:$PATH "
374
376
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
-
381
377
# 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
+ #
386
382
if [ -f ~ /.asdf/asdf.sh ]; then
387
383
source ~ /.asdf/asdf.sh
388
384
fi
389
385
390
-
391
386
# Encoding problems with gem
392
387
export LC_ALL=en_US.UTF-8
393
388
export LANG=en_US.UTF-8
@@ -416,12 +411,12 @@ if [ -e /usr/local/opt/fzf/shell/completion.zsh ]; then
416
411
fi
417
412
418
413
# 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"
421
416
fi
422
417
if [ -e ~ /.fzf ]; then
423
418
source ~ /.fzf/shell/key-bindings.zsh
424
- source ~ /.fzf/shell/completion.zsh
419
+ # source ~/.fzf/shell/completion.zsh
425
420
fi
426
421
427
422
if which fzf & > /dev/null && which rg & > /dev/null; then
@@ -431,25 +426,6 @@ if which fzf &> /dev/null && which rg &> /dev/null; then
431
426
set_fzf_default_opts
432
427
fi
433
428
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
-
453
429
# Try out `z`
454
430
if [ -e /usr/local/etc/profile.d/z.sh ]; then
455
431
source /usr/local/etc/profile.d/z.sh
@@ -462,9 +438,6 @@ if which bat &> /dev/null; then
462
438
alias cat=bat
463
439
fi
464
440
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
-
468
441
# Export my personal ~/bin as last one to have highest precedence
469
442
export PATH=" $HOME /bin:$PATH "
470
443
0 commit comments