diff --git a/home/fish.nix b/home/fish.nix index 5fa2182..f4fafa1 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -67,18 +67,14 @@ ${pkgs.ffmpeg}/bin/ffmpeg -hide_banner -v error $argv[..-2] -i $argv[-1] -map 0:v -f md5 - ''; rm.body = '' - if type -q trash + if which trash >/dev/null trash $argv else - 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 + 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 end + rm $argv end ''; };