shell-safe-rm icon indicating copy to clipboard operation
shell-safe-rm copied to clipboard

Error in filenames with more than 2 spaces (1.0.7)

Open pveierland opened this issue 2 years ago β€’ 1 comments

Thank you for a great program!

I've been using it for a while, however I got an error today for a filename with more than two spaces:

touch "a b c"
./rm.sh "a b c"
basename: extra operand β€˜c’
Try 'basename --help' for more information.
basename: extra operand β€˜c’
Try 'basename --help' for more information.

The program appears to do the right thing, as the file is removed and seemingly correctly placed in the trash.

Note that there is no error for a filename with 1 space:

touch "a b"
./rm.sh "a b"

System configuration:

alias rm='/nix/store/16m5g0j6rc9fx3rxhxbwzs4sy07abyd5-shell-safe-rm-1.0.7/bin/rm.sh'
GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu)
Linux xxx 5.10.101 #1-NixOS SMP Wed Feb 16 11:54:31 UTC 2022 x86_64 GNU/Linux

pveierland avatar Mar 21 '22 09:03 pveierland

I am having the same problem.

[snowman@asus ~/Downloads] rm -rf All\ About\ The\ Benjamins\ \(2002\)
basename: extra operand β€˜The’
Try 'basename --help' for more information.
basename: extra operand β€˜The’
Try 'basename --help' for more information.

System Details

Linux asus 5.18.0-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 26 May 2022 13:26:58 +0000 x86_64 GNU/Linux

My basename version is

basename (GNU coreutils) 9.1

Command executed on Tue May 31 07:35:24 PM SAST 2022

rial1106 avatar May 31 '22 17:05 rial1106