浏览代码

Simplify QuitCD scripts

master
Arun Prakash Jana 5 年前
父节点
当前提交
c24efdbedb
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 4 个文件被更改,包括 10 次插入3 次删除
  1. +3
    -1
      misc/quitcd/quitcd.bash
  2. +1
    -0
      misc/quitcd/quitcd.csh
  3. +3
    -1
      misc/quitcd/quitcd.fish
  4. +3
    -1
      misc/quitcd/quitcd.zsh

+ 3
- 1
misc/quitcd/quitcd.bash 查看文件

@@ -7,7 +7,8 @@ n ()
fi

# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"

@@ -15,6 +16,7 @@ n ()
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef

nnn "$@"



+ 1
- 0
misc/quitcd/quitcd.csh 查看文件

@@ -9,5 +9,6 @@ set NNN_TMPFILE=~/.config/nnn/.lastd
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef

alias n 'nnn -fis; source "$NNN_TMPFILE"; rm -f "$NNN_TMPFILE"'

+ 3
- 1
misc/quitcd/quitcd.fish 查看文件

@@ -10,7 +10,8 @@ function n --description 'support nnn quit and change directory'
end

# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
# To cd on quit only on ^G, remove the "-x" as in:
# set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
@@ -22,6 +23,7 @@ function n --description 'support nnn quit and change directory'
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef

nnn $argv



+ 3
- 1
misc/quitcd/quitcd.zsh 查看文件

@@ -7,7 +7,8 @@ n ()
fi

# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"

@@ -15,6 +16,7 @@ n ()
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef

nnn "$@"



正在加载...
取消
保存