瀏覽代碼

Merge pull request #302 from fokinpv/fix-quitcd-example

Fix quitcd snippets for 'zsh' and 'bash'
master
Mischievous Meerkat GitHub 6 年之前
父節點
當前提交
d03ff4dc91
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 3 個檔案被更改,包括 6 行新增6 行删除
  1. +2
    -2
      misc/quitcd/quitcd.bash
  2. +2
    -2
      misc/quitcd/quitcd.fish
  3. +2
    -2
      misc/quitcd/quitcd.zsh

+ 2
- 2
misc/quitcd/quitcd.bash 查看文件

@@ -1,9 +1,9 @@
n()
{
nnn "$@"

NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd

nnn "$@"

if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE
rm -f $NNN_TMPFILE > /dev/null


+ 2
- 2
misc/quitcd/quitcd.fish 查看文件

@@ -3,11 +3,11 @@
# or, add the lines to the 'config.fish' file.

function n --description 'support nnn quit and change directory'
nnn $argv

# NOTE: set NNN_TMPFILE correctly if you use 'XDG_CONFIG_HOME'
set NNN_TMPFILE ~/.config/nnn/.lastd

nnn $argv

if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE


+ 2
- 2
misc/quitcd/quitcd.zsh 查看文件

@@ -1,9 +1,9 @@
n()
{
nnn "$@"

NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd

nnn "$@"

if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE
rm $NNN_TMPFILE


Loading…
取消
儲存