feat(n³): config upgrade
This commit is contained in:
parent
8e6b83b196
commit
65e7a2483e
23
.zshrc
23
.zshrc
@ -233,11 +233,11 @@ export NNN_ARCHIVE='\.(7z|bz2|gz|tar|tbz|tgz|xz|zip|zst)$'
|
|||||||
if (( ${+commands[fuse-archive]} )); then
|
if (( ${+commands[fuse-archive]} )); then
|
||||||
export NNN_ARCHMNT='fuse-archive'
|
export NNN_ARCHMNT='fuse-archive'
|
||||||
fi
|
fi
|
||||||
export NNN_BMS="d:$HOME/Downloads"
|
export NNN_BMS="d:~/Downloads"
|
||||||
export NNN_OPENER="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
|
export NNN_OPENER="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
|
||||||
export NNN_OPTS='ABcGHin'
|
export NNN_OPTS='ABeGHo'
|
||||||
export NNN_ORDER="t:$HOME/Downloads"
|
export NNN_ORDER="t:$HOME/Downloads"
|
||||||
export NNN_PLUG="d:diffs;D:dragdrop;M:xdgdefault"
|
export NNN_PLUG='d:fzcd;o:-!xdg-open "$nnn"*;z:fzopen'
|
||||||
if (( ${+commands[trash-put]} )); then
|
if (( ${+commands[trash-put]} )); then
|
||||||
export NNN_TRASH=1
|
export NNN_TRASH=1
|
||||||
elif (( ${+commands[gio]} )); then
|
elif (( ${+commands[gio]} )); then
|
||||||
@ -251,16 +251,29 @@ n()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LESS=${LESS/F}
|
export GUI=1 # plugins: nuke, xdgdefault
|
||||||
|
export LESS=${LESS/F}
|
||||||
|
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/cd-on-quit"
|
||||||
command nnn "$@"
|
command nnn "$@"
|
||||||
|
|
||||||
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
|
||||||
if [ -f $NNN_TMPFILE ]; then
|
if [ -f $NNN_TMPFILE ]; then
|
||||||
|
setopt autopushd
|
||||||
. $NNN_TMPFILE
|
. $NNN_TMPFILE
|
||||||
rm -f $NNN_TMPFILE > /dev/null
|
rm -f $NNN_TMPFILE > /dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nnn-file-widget() {
|
||||||
|
local item
|
||||||
|
nnn -p- <"$TTY" |
|
||||||
|
while read item; do
|
||||||
|
LBUFFER+="${(q-)item} "
|
||||||
|
done
|
||||||
|
}
|
||||||
|
zle -N nnn-file-widget
|
||||||
|
bindkey -M vicmd '\en' nnn-file-widget
|
||||||
|
bindkey -M viins '\en' nnn-file-widget
|
||||||
|
|
||||||
###
|
###
|
||||||
### Aliases -- Global & automatic expansion
|
### Aliases -- Global & automatic expansion
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user