Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Undoing mv foo.txt{,_}



Hello,

what would be a convenient way to remove specified trailing characters of a
string in ZLE?

For example, when I quickly want to add a suffix to a string/filename, I
usually do

mv file.txt{,_}

What's a good way to move file.txt_ back to file.txt, or more general: how
to remove the suffix of a string, without putting it in a variable first
(e.g. a=foo.txt; mv $a $a:r)?

Thanks,
René


Messages sorted by: Reverse Date, Date, Thread, Author