sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

quitcd.csh (668B)


      1 # NOTE: set NNN_TMPFILE correctly if you use 'XDG_CONFIG_HOME'
      2 
      3 # The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
      4 # If NNN_TMPFILE is set to a custom path, it must be exported for nnn to see.
      5 # To cd on quit only on ^G, set NNN_TMPFILE after the nnn invocation, and make
      6 # sure not to use a custom path.
      7 set NNN_TMPFILE=~/.config/nnn/.lastd
      8 
      9 # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
     10 # stty start undef
     11 # stty stop undef
     12 # stty lwrap undef
     13 # stty lnext undef
     14 
     15 # The backslash allows one to alias n to nnn if desired without making an
     16 # infinitely recursive alias
     17 alias n '\nnn; source "$NNN_TMPFILE"; rm -f "$NNN_TMPFILE"'