[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: forwarded weirdness report
From: |
Martin Schulte |
Subject: |
Re: forwarded weirdness report |
Date: |
Tue, 29 Mar 2022 08:38:23 +0200 |
Hello Greg, hello *!
> And here's a workaround:
>
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"; x'
> bash: x: command not found
> unicorn:~$ bash --noprofile --norc -i -c $'alias x="echo hallo"\nx'
> hallo
Really cool - thanks!
> Put a literal newline in the -c argument, rather than a semicolon.
>
> Or -- and I know this answer will be rejected, because it's too simple
> and sensible -- stop using aliases in scripts.
Or even stop using them at all,
alias egrep1='grep -E'
doesn't save much compared to
egrep2() { grep -E "$@" ; }
Or is there a reason why one shouldn't use this in an interactive shell?
Best regards
Martin
- forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/28
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/28
- Re: forwarded weirdness report, Martin Schulte, 2022/03/28
- Re: forwarded weirdness report, Lawrence Velázquez, 2022/03/28
- Re: forwarded weirdness report, Chet Ramey, 2022/03/28
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/28
- Re: forwarded weirdness report, Greg Wooledge, 2022/03/28
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/28
- Re: forwarded weirdness report,
Martin Schulte <=
- Re: forwarded weirdness report, Chris Elvidge, 2022/03/29
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/29
- Re: forwarded weirdness report, Lawrence Velázquez, 2022/03/30
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/30
- Re: forwarded weirdness report, Lawrence Velázquez, 2022/03/30
- Re: forwarded weirdness report, Alex fxmbsw7 Ratchev, 2022/03/30