From 145cc8ec9354443744dfff8d05e966a8bc9b9294 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 21 Aug 2024 15:18:34 +0200 Subject: feat(pkgs/lm): Init and use in pkgs --- pkgs/by-name/ll/lm/lm.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pkgs/by-name/ll/lm/lm.sh (limited to 'pkgs/by-name/ll/lm/lm.sh') diff --git a/pkgs/by-name/ll/lm/lm.sh b/pkgs/by-name/ll/lm/lm.sh new file mode 100755 index 00000000..55be0798 --- /dev/null +++ b/pkgs/by-name/ll/lm/lm.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +if [ -f "$XDG_RUNTIME_DIR/ll/last_directory" ]; then + last_dir="$(cat "$XDG_RUNTIME_DIR/ll/last_directory")" + cd "$last_dir" || die "$last_dir does not exist!" +else + msg "No last directory safed (try using ll instead)." +fi +# vim: ft=sh -- cgit 1.4.1