dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seb <sbb@tuxfamily.org>
To: dash@vger.kernel.org
Cc: Rusty Bird <rustybird@openmailbox.org>
Subject: Re: Ignored alias inside for loop
Date: Mon, 27 Jul 2015 10:24:19 +0200	[thread overview]
Message-ID: <20150727082419.GA811@ein.free.fr> (raw)
In-Reply-To: <55B50628.5090901@openmailbox.org>

On Sun, Jul 26, 2015 at 04:09:12PM +0000, Rusty Bird wrote:

Hello,

> > Using a function instead of an alias, or using eval will do what
> > you want.
> 
> Do you mean replacing the line with: eval "alias foobarbaz='echo ok'"
> That doesn't seem to work either (in dash or bash).

In this case, where there is no further expansion to be done in the
alias content, you could use a mere variable:

  foobarbaz='echo ok'
  $foobarbaz "$@"

Or, if some further expansion has to be made, 'eval' again:

  foobarbaz='echo $PATH'
  eval $foobarbaz '"$@"'

++
Seb.


      parent reply	other threads:[~2015-07-27  8:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-26  9:23 Rusty Bird
2015-07-26 15:26 ` Jilles Tjoelker
2015-07-26 16:09   ` Rusty Bird
2015-07-26 18:41     ` Jilles Tjoelker
2015-07-27  8:24     ` Seb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150727082419.GA811@ein.free.fr \
    --to=sbb@tuxfamily.org \
    --cc=dash@vger.kernel.org \
    --cc=rustybird@openmailbox.org \
    --subject='Re: Ignored alias inside for loop' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).