add cdlf and lfcd functions
This commit is contained in:
parent
9f992fef60
commit
d114544614
13
aliases.sh
13
aliases.sh
|
@ -61,9 +61,20 @@ function npm {
|
||||||
# lf gets confused by TERMINFO env var when running in tmux
|
# lf gets confused by TERMINFO env var when running in tmux
|
||||||
# https://github.com/gokcehan/lf/issues/138#issuecomment-464477665
|
# https://github.com/gokcehan/lf/issues/138#issuecomment-464477665
|
||||||
if [ -n "$TERMINFO" ] ; then
|
if [ -n "$TERMINFO" ] ; then
|
||||||
alias lf="TERMINFO= lf"
|
alias lf="TERMINFO= lf -last-dir-path=$HOME/.cache/lf-last-dir"
|
||||||
|
else
|
||||||
|
alias lf="lf -last-dir-path=$HOME/.cache/lf-last-dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cdlf() {
|
||||||
|
cd "$(cat $HOME/.cache/lf-last-dir)"
|
||||||
|
}
|
||||||
|
|
||||||
|
lfcd() {
|
||||||
|
lf -last-dir-path="$HOME"/.cache/lf-last-dir
|
||||||
|
cdlf
|
||||||
|
}
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
# $1 - output directory
|
# $1 - output directory
|
||||||
# $2 - size
|
# $2 - size
|
||||||
|
|
Loading…
Reference in New Issue