Axel Liljencrantz wrote:
> On 10/19/07, Martin Bähr <[EMAIL PROTECTED]> wrote:
>> On Fri, Oct 19, 2007 at 01:01:35PM +0200, Beni Cherniavsky wrote:
>>> 0. Now: Allow ">?" or "?>" and ">!" or "!>" to explicitly mean
>>> noclobber, and encourage people to rewrite scripts.
>> i have been wondering about a syntax for an explicit noclobber.
>>
>>> ? or ?> look good.
>> generally though i'd prefer not to change > for consistency.
>> my main concern is: i'll get used to > not overwriting a file and then
>> when i work in a different shell (because fish is not on every machine),
>> i'll likely forget that > is different and get bitten by it.
> 
> At least zsh and bash already support a noclobber option, though like
> pretty much every useful shell feature in the universe, it is disabled
> by default. I don't know how many people manually enable it. My
> experience tells me that very few people have enough energy to go
> through the huge list of configuration options and enable the ones
> they like.

Most people like myself don't even know that those options exist.

Anyway, I haven't been following this thread quite as close as I should 
but won't it make more sense for fish to give a warning when an existing 
  file is going to clobbered?

   cat foo.txt > already_existing_bar.txt

fish could then highlight the "> already_existing_bar.txt" in red or 
something to warn the user? In most cases > won't be overwriting a file, 
so the command line will look plain, seeing a unexpected red or yellow 
background colour for example could be an effective warning.

cheers,

-- 
Simon Edwards             | KDE-NL, Guidance tools, Guarddog Firewall
[EMAIL PROTECTED]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to