46 lines
1.7 KiB
Bash
46 lines
1.7 KiB
Bash
AGKOZAK_MULTILINE=0
|
||
AGKOZAK_PROMPT_CHAR=( ❯ ❯ "%F{red}N%f")
|
||
autoload -Uz history-search-end
|
||
|
||
zle -N history-beginning-search-backward-end history-search-end
|
||
zle -N history-beginning-search-forward-end history-search-end
|
||
|
||
bindkey -M vicmd '^[[A' history-beginning-search-backward-end \
|
||
'^[OA' history-beginning-search-backward-end \
|
||
'^[[B' history-beginning-search-forward-end \
|
||
'^[OB' history-beginning-search-forward-end
|
||
bindkey -M viins '^[[A' history-beginning-search-backward-end \
|
||
'^[OA' history-beginning-search-backward-end \
|
||
'^[[B' history-beginning-search-forward-end \
|
||
'^[OB' history-beginning-search-forward-end
|
||
|
||
hash go 2>/dev/null && export PATH=$PATH:$(go env GOPATH)/bin
|
||
hash yarn 2>/dev/null && export PATH=$PATH:$HOME/.yarn/bin
|
||
hash direnv 2>/dev/null && eval "$(direnv hook zsh)" # needed for lorri
|
||
hash helm 2>/dev/null && . <(helm completion zsh)
|
||
hash kubectl 2>/dev/null && . <(kubectl completion zsh)
|
||
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
|
||
|
||
n ()
|
||
{
|
||
# Block nesting of nnn in subshells
|
||
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
||
echo "nnn is already running"
|
||
return
|
||
fi
|
||
|
||
export NNN_TMPFILE="$HOME/.config/nnn/.lastd"
|
||
|
||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||
# stty start undef
|
||
# stty stop undef
|
||
# stty lwrap undef
|
||
# stty lnext undef
|
||
|
||
nnn -d "$@"
|
||
|
||
if [ -f "$NNN_TMPFILE" ]; then
|
||
. "$NNN_TMPFILE"
|
||
rm -f "$NNN_TMPFILE" > /dev/null
|
||
fi
|
||
}
|