Closed pabs3 closed 3 years ago
What if you wanna trash a file named empty
?
The trash
command could detect that its argument is both a file and a
subcommand then either exit with an error or alternatively assume that
the argument being a file overrides it being a subcommand and trash the
empty
or put
etc files. The first option would be safer and more
explicit, while the second option would be more compatible with the
current behaviour.
-- bye, pabs
I don't like the idea that a command change semantic according which file is in the file system.
That was an idea for how to transition from the current trash command
to becoming solely a multiplexer. You could deprecate trash file.txt
,
make it still work but print a warning and later remove it.
-- bye, pabs
I think the trend of having a short primary command name that is a multiplexer for different subcommands is very ergonomic on the command-line. For example
git
hasgit commit
,git push
etc.I think it would be nice to have
trash
similarly be a subcommand multiplexer, but still allow fortrash foo.txt
to call theput
subcommand by default.