diff options
Diffstat (limited to 'pkgs/by-name/ll')
-rwxr-xr-x | pkgs/by-name/ll/ll/ll.sh | 8 | ||||
-rw-r--r-- | pkgs/by-name/ll/ll/package.nix | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/by-name/ll/ll/ll.sh b/pkgs/by-name/ll/ll/ll.sh index 73328e3e..3fb8d9aa 100755 --- a/pkgs/by-name/ll/ll/ll.sh +++ b/pkgs/by-name/ll/ll/ll.sh @@ -1,9 +1,10 @@ #!/usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - last_directory="$(mktemp)" +cleanup() { + rm "$last_directory" +} +trap cleanup EXIT command lf -last-dir-path="$last_directory" "$@" @@ -15,5 +16,4 @@ else die "$dir does not exist!" fi -rm "$last_directory" # vim: ft=sh diff --git a/pkgs/by-name/ll/ll/package.nix b/pkgs/by-name/ll/ll/package.nix index 4c13b40e..caca5b4e 100644 --- a/pkgs/by-name/ll/ll/package.nix +++ b/pkgs/by-name/ll/ll/package.nix @@ -1,9 +1,9 @@ -{sysLib}: -sysLib.writeShellScript { +{writeShellApplication}: +writeShellApplication { name = "ll"; - src = ./ll.sh; - generateCompletions = false; + text = builtins.readFile ./ll.sh; - # `ll` must be able to change the path of the running shell. - wrap = false; + # This is sourced in the shell + inheritPath = true; + bashOptions = []; } |