diff --git a/home/fish.nix b/home/fish.nix index f4fafa1..5fa2182 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -67,14 +67,18 @@ ${pkgs.ffmpeg}/bin/ffmpeg -hide_banner -v error $argv[..-2] -i $argv[-1] -map 0:v -f md5 - ''; rm.body = '' - if which trash >/dev/null + if type -q trash trash $argv else - if test $TRASH_MESSAGE_PRINTED != 1 - echo (set_color blue)"trash-cli not installed ! falling back to using unforgiving rm" - set TRASH_MESSAGE_PRINTED 1 + if not test $TRASH_MESSAGE_PRINTED + echo (set_color blue)"trash-cli not installed! Falling back to using unforgiving rm"(set_color reset) + set -gx TRASH_MESSAGE_PRINTED 1 + end + if type -q /usr/bin/rm + /usr/bin/rm $argv + else + ${pkgs.coreutils}/bin/rm $argv end - rm $argv end ''; };