Skip to content

Commit

Permalink
Merge pull request #288 from himkt/zsh-config
Browse files Browse the repository at this point in the history
misc(zsh): fix completion and cleanup opts
  • Loading branch information
himkt authored Dec 30, 2024
2 parents a0e5dd0 + c9dd9d6 commit 0eb4060
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions zsh/config.d/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@
bindkey -e

autoload -Uz compinit && compinit
autoload -U colors && colors
autoload -Uz zmv && alias zmv='noglob zmv -W'
zstyle ':completion:*:default' menu select=1

setopt auto_cd
setopt correct
setopt auto_param_keys
setopt auto_param_slash
setopt complete_aliases
setopt complete_in_word
setopt extended_history
setopt share_history
setopt magic_equal_subst
setopt mark_dirs
setopt no_beep
setopt prompt_subst
autoload -Uz colors && colors
autoload -Uz zmv && alias zmv='noglob zmv -W'

setopt auto_cd # cd without cd
setopt extended_history # include timestamp and duration to the history.
setopt share_history # persist history to the file.
setopt magic_equal_subst # expand filename for unquoted arguments.
setopt mark_dirs # insert '/' when directory is expanded via globbing.
setopt no_beep # disable beep in ZLE.
setopt prompt_subst # enable substitution in prompt (needed if we want to show information in PROMPT).

zstyle ':completion:*:default' menu select=2 # enable menu in completion.

function ls () {
case ${OSTYPE} in
Expand Down Expand Up @@ -201,7 +197,6 @@ if command -v kubectl > /dev/null; then
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
source <(kubectl completion zsh)
alias k=kubectl
compdef _kubectl k
fi

if [ -f "$HOME/.cargo/env" ]; then
Expand Down

0 comments on commit 0eb4060

Please sign in to comment.