add log file for lf
This commit is contained in:
parent
951379995b
commit
1f2bdb8ba9
2 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,7 @@ export XDG_CONFIG_HOME=${HOME}/.local/config
|
||||||
export XDG_DATA_HOME=${HOME}/.local/share
|
export XDG_DATA_HOME=${HOME}/.local/share
|
||||||
export XDG_CACHE_HOME=${HOME}/.local/cache
|
export XDG_CACHE_HOME=${HOME}/.local/cache
|
||||||
export XDG_STATE_HOME=${HOME}/.local/state
|
export XDG_STATE_HOME=${HOME}/.local/state
|
||||||
|
export LOG_HOME="${XDG_STATE_HOME}/logs"
|
||||||
|
|
||||||
# == load all enabled scripts in ~/.bashrc.d
|
# == load all enabled scripts in ~/.bashrc.d
|
||||||
# == any scripts with the .disabled extension won't be loaded
|
# == any scripts with the .disabled extension won't be loaded
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
lf () {
|
lf () {
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp)"
|
||||||
|
|
||||||
command lf --last-dir-path="$tmp" "$@"
|
logpath="${LOG_HOME}/lf.log"
|
||||||
|
|
||||||
|
command lf --last-dir-path="$tmp" --log="$logpath" "$@"
|
||||||
if [ -f "$tmp" ]; then
|
if [ -f "$tmp" ]; then
|
||||||
dir="$(cat "$tmp")"
|
dir="$(cat "$tmp")"
|
||||||
rm -f "$tmp"
|
rm -f "$tmp"
|
||||||
|
|
Loading…
Reference in a new issue