[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redirection between assignment statement and command name prevents a
From: |
Robert Elz |
Subject: |
Re: Redirection between assignment statement and command name prevents alias substitution |
Date: |
Thu, 25 Mar 2021 22:58:32 +0700 |
Date: Thu, 25 Mar 2021 08:00:20 +0200
From: =?UTF-8?B?T8SfdXo=?= <oguzismailuysal@gmail.com>
Message-ID:
<CAH7i3LoJDv-xB6n-pyh7-kPyqjVFNW_ut9NJpVA_-NEczirzew@mail.gmail.com>
| They are fine as an interactive feature but definitely don't belong in
| shell scripts.
They're not fine anywhere, anything sane that can be done with an alias
can be done better with a function.
Omitting them from the standard would stop forcing shells to implement this
nonsense, and allow it to wither and die.
| Besides the ordinary user doesn't expect anything beyond simple aliases
| like `la='ls -A' ll='ls -lh''
la() { command ls -A "$@"; }; ll() { command ls -lh "$@"; }
Slightly longer to type, but just as good, and if desired, can easily
be extended to do so much more (different default options depending upon
which directory you're in, ...)
kre
ps: "command" in the functions is just in case ls also becomes a function,
and those ones want to run the real ls, but that's optional, it all depends
what is wanted ... with functions you get a choice.
- Re: Redirection between assignment statement and command name prevents alias substitution, (continued)
- Re: Redirection between assignment statement and command name prevents alias substitution, Oğuz, 2021/03/23
- Re: Redirection between assignment statement and command name prevents alias substitution, Robert Elz, 2021/03/23
- Redirection between assignment statement and command name prevents alias substitution, Oğuz, 2021/03/23
- Re: Redirection between assignment statement and command name prevents alias substitution, Robert Elz, 2021/03/23
- Re: Redirection between assignment statement and command name prevents alias substitution, Oğuz, 2021/03/24
- Re: Redirection between assignment statement and command name prevents alias substitution, Robert Elz, 2021/03/24
- Re: Redirection between assignment statement and command name prevents alias substitution, Oğuz, 2021/03/25
- Re: Redirection between assignment statement and command name prevents alias substitution, Chris F.A. Johnson, 2021/03/25
- Re: Redirection between assignment statement and command name prevents alias substitution, Oğuz, 2021/03/25
- Re: Redirection between assignment statement and command name prevents alias substitution, Chet Ramey, 2021/03/29
- Re: Redirection between assignment statement and command name prevents alias substitution,
Robert Elz <=