about summary refs log tree commit diff stats
path: root/home-manager/packages/scripts/wrappers/ll
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-05-28 22:13:25 +0200
committerSoispha <soispha@vhack.eu>2023-05-28 22:13:25 +0200
commitdf2e5904b9060d7b39f7ade123d1f5912dbeb06f (patch)
tree1107ea237ee28c221c76cf9e6cbd0bb1d9cc49d7 /home-manager/packages/scripts/wrappers/ll
parentDocs(hm/wms/river/init): Add a hint to simplify script (diff)
downloadnixos-config-df2e5904b9060d7b39f7ade123d1f5912dbeb06f.zip
Fix(hm/pkgs/scrs): Rework some of them
Diffstat (limited to 'home-manager/packages/scripts/wrappers/ll')
-rwxr-xr-xhome-manager/packages/scripts/wrappers/ll13
1 files changed, 4 insertions, 9 deletions
diff --git a/home-manager/packages/scripts/wrappers/ll b/home-manager/packages/scripts/wrappers/ll
index 48bd0ad3..f1d96f15 100755
--- a/home-manager/packages/scripts/wrappers/ll
+++ b/home-manager/packages/scripts/wrappers/ll
@@ -3,16 +3,11 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
-export LLP=0
-tmp="$(mktmp)"
+last_directory="$(mktmp)"
 
-lf -last-dir-path="$tmp" "$@"
+command lf -last-dir-path="$last_directory" "$@"
 
-if [ -f "$tmp" ]; then
-    dir="$(cat "$tmp")"
-    if [ -d "$dir" ] && [ "$dir" != "$(pwd)" ];then
-        cd "$dir" || die "$dir doesn't exits!"
-    fi
-fi
+dir="$(cat "$last_directory")"
+cd "$dir" || die "$dir does not exist!"
 
 # vim: ft=sh