|
|
|
|
@ -113,9 +113,41 @@ COMPLETION_WAITING_DOTS="true" |
|
|
|
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ |
|
|
|
|
# Example format: plugins=(rails git textmate ruby lighthouse) |
|
|
|
|
# Add wisely, as too many plugins slow down shell startup. |
|
|
|
|
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux zsh-syntax-highlighting zsh-autosuggestions kubectl helm terraform asdf brew web-search kubectl helm aliases emacs) |
|
|
|
|
plugins=(colorize colored-man-pages vi-mode common-aliases themes dircycle iterm2 zsh-navigation-tools urltools history zsh-syntax-highlighting zsh-autosuggestions web-search aliases) |
|
|
|
|
|
|
|
|
|
# consider plugin fzf - only available for Mac/Linux |
|
|
|
|
cmd_plugins=(rsync tmux docker docker-compose tmux kubectl helm terraform asdf brew emacs fzf asdf brew emacs) |
|
|
|
|
|
|
|
|
|
# Add a plugin only if its command exists |
|
|
|
|
add_plugin_if_command_exists() { |
|
|
|
|
local cmd="$1" |
|
|
|
|
if [[ -n ${commands[$cmd]} ]]; then |
|
|
|
|
# Only append if not already in the plugins array |
|
|
|
|
if (( ! ${plugins[(Ie)$cmd]} )); then |
|
|
|
|
plugins+=("$cmd") |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for cmd in $cmd_plugins; do |
|
|
|
|
add_plugin_if_command_exists "$cmd" |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
# use mercurial plugin |
|
|
|
|
if [[ -n ${commands[hg]} ]]; then |
|
|
|
|
plugins+=("mercurial") |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# use macos plugin |
|
|
|
|
if [[ "$(uname -o)" == "Darwin" ]]; then |
|
|
|
|
plugins+=("macos") |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# use zoxide |
|
|
|
|
if [[ -n ${commands[zoxide]} ]]; then |
|
|
|
|
export FZF_DEFAULT_OPTS="--style full" |
|
|
|
|
export _ZO_FZF_OPTS="--height ~90% --tmux bottom,70% --layout reverse" |
|
|
|
|
eval "$(zoxide init --cmd cd zsh)" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# colorize - adds ccat and cless |
|
|
|
|
# common-aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/common-aliases |
|
|
|
|
@ -245,3 +277,5 @@ export PATH=$GEM_HOME/bin:$HOME/.gem/ruby/3.3.0/bin:$PATH |
|
|
|
|
|
|
|
|
|
# alias scm-ssh='/Users/jetpac/.ssh/scm-script.sh' |
|
|
|
|
# scm-ssh start_agent |
|
|
|
|
|
|
|
|
|
# export FZF_DEFAULT_OPTS="--style full --preview '/opt/homebrew/bin/pygmentize -g {}' --bind 'focus:transform-header:file --brief {}'" |
|
|
|
|
|