better rm to trash conversion
This commit is contained in:
parent
9c6f99fe7b
commit
f55198f27b
1 changed files with 15 additions and 1 deletions
|
|
@ -66,6 +66,21 @@
|
|||
ffsum.body = ''
|
||||
${pkgs.ffmpeg}/bin/ffmpeg -hide_banner -v error $argv[..-2] -i $argv[-1] -map 0:v -f md5 -
|
||||
'';
|
||||
rm.body = ''
|
||||
if type -q trash
|
||||
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
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
|
|
@ -74,7 +89,6 @@
|
|||
grep = "grep --color=auto";
|
||||
diff = "diff --color=auto";
|
||||
dev = "nix develop -c fish";
|
||||
rm = "trash";
|
||||
del = "rm -rf";
|
||||
rsyncp = "rsync --info=progress2 --no-inc-recursive";
|
||||
ffmpeg = "ffmpeg -hide_banner";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue