2020-12-23 23:28:25 +00:00
|
|
|
# Change working dir in tcsh to last dir in lf on exit (adapted from ranger).
|
2019-12-19 19:11:23 +00:00
|
|
|
#
|
2020-12-23 23:28:25 +00:00
|
|
|
# You need to either copy the content of this file to your shell rc file (e.g.
|
|
|
|
# ~/.tcshrc) or source this file directly:
|
2019-12-19 19:11:23 +00:00
|
|
|
#
|
2020-12-23 23:28:25 +00:00
|
|
|
# setenv LF_HOME "${HOME}/.config/lf"
|
|
|
|
# [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
|
2019-12-19 19:11:23 +00:00
|
|
|
#
|
2020-12-23 23:28:25 +00:00
|
|
|
# You may also like to assign a key to this command:
|
2019-12-19 19:11:23 +00:00
|
|
|
#
|
2020-12-23 23:28:25 +00:00
|
|
|
# bindkey -c "^O" lfcd
|
2019-12-19 19:11:23 +00:00
|
|
|
#
|
2020-12-23 23:28:25 +00:00
|
|
|
|
2019-12-19 19:11:23 +00:00
|
|
|
alias lfcd 'set _=`mktemp` && lf -last-dir-path=$_ "\!*" && set _=`cat $_ && rm -f $_` && [ -d "$_" ] && cd "$_"'
|