Pierre Gaston wrote:
Besides the fact that most people don't use alias in script
---
That's due to bash being non-POSIX compatible, by default in regard to
aliases. Aliases are designed to "always be there" and always be "on"
unless
explicitly turned off so people could rely on them.
On Sun, Oct 1, 2017 at 7:31 AM, L A Walsh wrote:
> I was looking at a script that tested command for execute before
> executing them.
> The script used:
>
> cmd=$(PATH=/stdpath type -p cmd)
>
> and later tested executability with "-x $cmd", raising 2 problems. The
> first was "-p" returning empt
Mikulas Patocka wrote:
The problem occurs even in non-login shells -
the chrome browser is
started from a bash script, on some distributions firefox is also started
from a bash script, mail daemon may start a script specified in user's
".forward" file. And these scripts also poke $OLDPWD
On 9/30/17 4:20 AM, Mikulas Patocka wrote:
> Is there some reason why do we need to check if $OLDPWD is a real
> directory? dash and ksh accept the $OLDPWD variable, but don't poke it
> with the stat syscall. zsh clears $OLDPWD.
It makes no sense to inherit it if it doesn't name a directory (or
On Sat, 30 Sep 2017, L A Walsh wrote:
>
>
> Mikulas Patocka wrote:
> > I don't set up OLDPWD in /etc/profile.
> ---
>No one does -- unless someone is trying to cause mischief. It's not
> a likely event, but it would be annoying if someone did it.
>But, FWIW, -- it seems like not usin