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

Re: zmv another zsh gem

On Thu, 17 Feb 2005 19:02:44 +0000,  wrote:

>Christian Taylor wrote:
>> On Tuesday 15 February 2005 09:51, zzapper wrote:
>> > In comp.editors I came across mmv and zmv
>> > [...]
>> > The case changers don't work on Cygwin because WinXP grumbles target &
>> > source filename are the same!
>> Using mv to change the case of a filename doesn't work on any "caseless" file
>> system like vfat, because both filenames refer to the same, existing file. 
>> Afaik POSIX compliance demands an error in that case. You'll have to do it in
>> two steps.
>Now I remember, zmv even warns you about this:
>% zmv foobar Foobar
>zmv: error(s) in substitution:
>file exists: Foobar
>(Probably the same file, owing to file system limitations.)
A work around is:-

zmv '(*~low)' low/'${(L)1}' #lowercase to subdirectory

which has the advantage of giving you a second chance if you get it wrong

zzapper (vim, cygwin, wiki & zsh)

vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips

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