Debian Codegraph @

etc/lfcd.csh

raw
1 # Change working dir in tcsh to last dir in lf on exit (adapted from ranger).
2 #
3 # You need to either copy the content of this file to your shell rc file (e.g.
4 # ~/.tcshrc) or source this file directly:
5 #
6 # setenv LF_HOME "${HOME}/.config/lf"
7 # [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
8 #
9 # You may also like to assign a key to this command:
10 #
11 # bindkey -c "^O" lfcd
12 #
13
14 alias lfcd 'set _=`mktemp` && lf -last-dir-path=$_ "\!*" && set _=`cat $_ && rm -f $_` && [ -d "$_" ] && cd "$_"'