pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Re: Help


From: Duncan
Subject: [Pan-users] Re: Help
Date: Tue, 6 Nov 2007 20:37:41 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

Per Hedeland <address@hidden> posted
address@hidden, excerpted below, on  Mon,
05 Nov 2007 22:29:51 +0100:

>>alias mv='mv -i'
>>alias rm='rm -i'
>>alias cp='cp -i'
> 
> I really have to disagree with this, and I think Duncan alluded to the
> problem in the part that you snipped: One day, at the worst possible
> moment, you'll find yourself without those aliases. Maybe there was a
> typo in your .bashrc that prevented those lines from being run, maybe
> you've 'su -'ed to another user, maybe you're helping a co-worker typing
> some commands into *his* shell... In the same vein, distributors that
> set up those aliases by default are doing their users a huge disservice.

You are correct.  Besides what you mentioned, which is bad enough, 
there's the problem of removing directories.  With -i by default, in a 
directory of more than a few files, that's a LOT of "y"s to type.  The 
very human reaction is then to add the -f/force option to override, but 
then not only are you back where you started, but are even in WORSE 
shape, because force is worse in terms of possible accidents than a bare 
rm.

So I prefer not to make -i the default in the first place.

> Aliases are fine for avoiding a lot of boring typing, in particular if
> they implement a "new command" - like your 'l' and 'll'. They're *not*
> fine for *replacing* standard commands with ones that have radically
> different semantics. Learn to work with the system instead - 'rm' *is*
> dangerous for the unwary, if you can't handle that sit on your hands or
> make a habit of using -i, or at least create a *differently named*
> alias, like, uh, 'del'...:-)

Learning it work with the system is indeed best.  Someone else already 
mentioned auto-complete.  I rely quite heavily on that as well.

Another thing that I'll often do is type in the command initially with 
something harmless like ls.  I can then do auto-complete without worrying 
about fat-fingering anything, and when it's showing what I want, even 
without ever hitting enter and completing the ls, I can hit home, then 
replace ls with rm and hit enter.  If there's any doubt at all, I just 
hit enter on the ls and see listed exactly what it would have deleted.  
If it's what I intended, then I just hit the up-arrow (to bring back the 
last command), home, and /then/ do the switch to rm.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]