dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Bird <rustybird@openmailbox.org>
To: dash@vger.kernel.org
Subject: Ignored alias inside for loop
Date: Sun, 26 Jul 2015 09:23:52 +0000	[thread overview]
Message-ID: <55B4A728.9080303@openmailbox.org> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

Why does this ...

#!/bin/sh
for i in 1; do
    alias foobarbaz='echo ok'
    foobarbaz
done

... result in "foobarbaz: not found", but without the for loop it works?
Maybe I'm missing something in the spec, because bash-as-sh behaves
the same.

Rusty
-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJVtKcoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfWacQAI0/zf4f4K0oJ+xM0wprmtiq
4aj5UfOasXZji6cPvc0VGZcSK+rVFdT8EW6XIoMlkU8Lxp9aVLuaQtjcez9JhwIM
k0V7cNhAGuyIAPNL/t6CHPb92MXSfHXf0SFZ6oDilMMtc9i38GDvAeA1RuS0bhrl
W2kolIWeaaeQk2q5bMN66Mj86509NC9aXVBXatvCUHgqpNNDu2elgGOs/Isd2KVC
TDk4qqDgm5wTLuQ0DMZ6KF4Odut8pW7HDhJMO82Y2ghqp5WH3OTgcgR+XTXeN/9Y
Kp1Rix3Lse+7q6cMq7CdYhcGTh0eiDJxGaCNY7ho0klOH3MAvoQmEjJucXUpRB9T
wOCliQOtppyA9rvsDqLfHbPFp8EHYUaLc9vpNUatURa44GyU/ks2LPexrMDg9mgC
CmttZZVjDIe8L8mJ4Ot99dLmCsB2dIcJfM8lMTufFaWr5CrYNDCXx85dDHNYP416
3t4FHPh3WNk43KbAVfc4VvXn77Ao1HUVRhambxmux4B0fudqTFERtZv+u2EmHE5a
krp42fho4G65BC9Gewsy1lwUj3FRum5gXYzEoMV3gWFyLFVa1v+v8sC3DQbk8waq
cvv9XuUUTky1Ksudpo7WJboY50H36hlbdHVwrhQIX8SWN44IvAW6ceJ4r+VBBq+C
heQEjK/iUn0hkhtt8MdZ
=H2bf
-----END PGP SIGNATURE-----

             reply	other threads:[~2015-07-26  9:31 UTC|newest]

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

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=55B4A728.9080303@openmailbox.org \
    --to=rustybird@openmailbox.org \
    --cc=dash@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).