On Sun, 25 Nov 2001, Paul Lussier wrote:
> If you learn the commands and learn them well you don't need aliases.
You don't need computers. Everything they do, you can do by hand. Of
course, they do make things a good deal *easier*. I view my collection of
aliases, shell functions, and shell scripts the same way. I can get along
just fine without them (I would hope so, as I programmed them originally).
I use them to make my life easier. They save wear-and-tear on my fingers.
You are free to make your life harder, of course. Although I don't see
why you don't just use Microsoft Windows in that case. ;-)
> I've found many people who come to depend so heavily on aliases ...
The fact that some people abuse them does not mean they are inherently
bad. You can find a way to abuse just about anything.
> I think the command [rm -rf] just rolled off my fingers without me
> really thinking about it ...
And you say *aliases* are dangerous?!? :-)
> ... I'm lazy ...
Me too, that's why I use aliases. ;-)
>> ls ls -F # -F puts the visual clue trailing character
>
> This would completely mess up things like:
>
> $ for i in `ls /some/long/path`
> > do
> > cp $i ${i}.bak
> > cp /some/long/path/$i .
> > done
Well, Paul, presumably, if you have your 'ls' command aliased, you will
know not do do things like that. "Don't do that, then!" :-)
Oh, and BTW:
for i in /some/long/path/*
makes a lot more sense. :-)
> I was more thinking in terms of those who decide to alias certain
> commands like ls = 'ls -F'. This type of alias, IMO, is the most
> dangerous, since you're now masking a real command.
I generally agree, although I think "ls" is an exception. It is a
read-only command, I use it all the time, and its output is generally
intended for human consumption.
> If you prefer to always see the file type characters at the end of a
> filename and you alias ls to be ls -F, then when you move to another
> system where that alias doesn't exist, and you get output completely
> different than what you expect, you may either waste your time trying to
> remember what all your aliases are, or, you may now need to clean up a
> mess you shouldn't have because of default behavior you've forgotten
> about and therefore didn't expect.
If someone is that clueless, I doubt they will have the ability to create
the alias in the first place. I would certainly think anyone encountering
that kind of trouble has issues beyond their aliases file. Indeed, anyone
that clueless is likely not qualified to be using the command line in the
first place. Give them their Macintosh back and let them go back to
ClarisWorks; they are obviously out of their depth. :-)
> Hmmmm, true, but more often than not alias files, and .[a-z,ba]shrc
> files, etc. are usually a very bad thing to be handing on from one
> person to another.
I think I see what you are getting at. I think you need to clarify your
point. Try this on for size:
Aliases are not the problem. The problem is aliasing commands *for
someone else*. If I alias 'ls' to 'rm -rf .', then that is my own business,
and presumably I have a reason. It is things like Unix and Linux distro
vendors setting up "default" aliases which gets people into trouble. I
think that is a bad idea, for all the reasons Paul brings up, and wish
vendors would not engage in the practice.
Is that what you are trying to say? :-)
> People in general never comment them ...
I comment mine. :-) And, in fact, for the same reason we are having this
conversation. People sometimes find useful things in others' aliases; I
want them to know what is going on, not just copy a set of magic runes.
> Case in point, I couldn't get Xv4 working on my system last week exactly
> because I copied someone elses config file without really understanding
> what it was doing.
GIGO. :-)
> You wouldn't catch a carpenter who didn't know all the ins and outs of
> his skill or miter saw ...
You also won't find a carpenter who insists on using hand tools for
building a house when power tools make the job ten times faster. :-)
--
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or |
| organization. All information is provided without warranty of any kind. |
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************