Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #255587

Re: alias in bash script issue

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: alias in bash script issue
Date 2023-03-04 17:30 +0100
Message-ID <G5CVH-a3pI-21@gated-at.bofh.it> (permalink)
References <G5vAR-9YKb-3@gated-at.bofh.it> <G5wQh-9ZrY-1@gated-at.bofh.it> <G5zXP-a1ze-3@gated-at.bofh.it> <G5BmV-a2k3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Mar 05, 2023 at 01:39:35AM +1100, David wrote:
> I am aware. 'man dash' better describes how aliases should be
> used in modern times,

???

Is this the paragraph you mean?

     Aliases provide a convenient way for naive users to create shorthands for
     commands without having to learn how to create functions with arguments.
     They can also be used to create lexically obscure code.  This use is dis‐
     couraged.

> 'man bash' avoids this clear language, which is unfortunate
> because that advice is what anyone who knows what they are
> doing will advise.

Do you mean this:

       For almost every purpose, aliases are superseded by shell functions.

Your statements are so incredibly vague that I can't tell what you're
trying to say.

In any case, the Subject: header still says "bash script", and in bash
scripts, aliases are disabled by default.  They have to be enabled
explicitly (shopt -s expand_aliases), before they can even be used.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

alias in bash script issue Ken Young <ken@highwinds.cloud> - 2023-03-04 09:40 +0100
  Re: alias in bash script issue David <bouncingcats@gmail.com> - 2023-03-04 11:00 +0100
    Re: alias in bash script issue Tom Furie <tom@furie.org.uk> - 2023-03-04 14:20 +0100
      Re: alias in bash script issue David <bouncingcats@gmail.com> - 2023-03-04 15:50 +0100
        Re: alias in bash script issue Greg Wooledge <greg@wooledge.org> - 2023-03-04 17:30 +0100
    Re: alias in bash script issue David Wright <deblis@lionunicorn.co.uk> - 2023-03-04 18:20 +0100
      Re: alias in bash script issue Greg Wooledge <greg@wooledge.org> - 2023-03-04 18:30 +0100
        Re: alias in bash script issue David Wright <deblis@lionunicorn.co.uk> - 2023-03-05 21:40 +0100
          Re: alias in bash script issue Greg Wooledge <greg@wooledge.org> - 2023-03-05 22:40 +0100
            Re: alias in bash script issue David Wright <deblis@lionunicorn.co.uk> - 2023-03-07 03:50 +0100
    Re: alias in bash script issue Ken Young <ken@highwinds.cloud> - 2023-03-05 02:30 +0100
      Re: alias in bash script issue Greg Wooledge <greg@wooledge.org> - 2023-03-05 02:40 +0100
        Re: alias in bash script issue Tom Browder <tom.browder@gmail.com> - 2023-03-05 12:30 +0100
          Re: alias in bash script issue Ken Young <ken@highwinds.cloud> - 2023-03-05 12:40 +0100
            Re: alias in bash script issue Tom Browder <tom.browder@gmail.com> - 2023-03-05 12:50 +0100
              Re: alias in bash script issue Nicolas George <george@nsup.org> - 2023-03-05 14:30 +0100
                Re: alias in bash script issue <tomas@tuxteam.de> - 2023-03-05 17:10 +0100
                Re: alias in bash script issue Tom Browder <tom.browder@gmail.com> - 2023-03-07 13:10 +0100
            Re: alias in bash script issue <tomas@tuxteam.de> - 2023-03-05 14:10 +0100
  Re: alias in bash script issue Yassine Chaouche <a.chaouche@algerian-radio.dz> - 2023-03-06 11:10 +0100

csiph-web