Re: 0.5.13.5: unwanted alias expansions
Steffen Nurpmeso <[email protected]>
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <20260812154033.1lYxKwQU@steffen%sdaoden.eu> |
Steffen Nurpmeso wrote in
<20260810214025.uEv9z5qG@steffen%sdaoden.eu>:
..
|I have a quite clumsy script environment with ~/.profile, ~/.shrc,
|~/.bash_logout etc that i try to use for all shells. Tried at
..and i cannot create a reproducer for the EXIT case as shown in
the last email: i think this really happens only in interactive
shells.
However, here is a very weird thing that shows multiple problems
of i think dash. You get several different outputs for
$ dash t.sh; DUDU=: dash t.sh
vs
$ bash t.sh; DUDU=: bash t.sh
With DUDU=: the read does not "hang", as in the interactive case.
That is all i know.
I say Ciao! already here.
: ${DUDU:='exit 0'}
trap : EXIT
doit() {
PROCID=$$
export PROCID
trap "echo 'Timeout expired'; rm -f \"$TMPDIR\"/.$$.sh; eval $DUDU" QUIT
/bin/sh -c '/bin/sleep 3 && kill -QUIT $PROCID' </dev/null >/dev/null 2>&1 &
killer=$!
read input
kill -TERM $killer
echo "input<$input>"
}
___on_exit() {
echo ex1
. "$TMPDIR"/.$$.sh
echo ex2
doit
echo ex3
}
trap ___on_exit EXIT
{ echo 'trap : EXIT'; echo 'rm -f "$TMPDIR"/.'$$'.sh'; echo 'doit'; } > "$TMPDIR"/.$$.sh
echo 1
alias l='echo -1'
echo 2
k= l=
echo 3 && l=-2 || l=-3
echo 4 && l='-2' || l='-3'
echo 5
exit
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)