mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-30 14:41:18 +02:00
fix off by one error when dequoting completed filenames; initial cut at readline identifying ANSI terminals; print coproc commands without coproc name if the coproc is a simple command
This commit is contained in:
@@ -157,6 +157,8 @@ hello
|
||||
world
|
||||
hello
|
||||
world
|
||||
here-doc line 1
|
||||
here-doc line 2
|
||||
here-document
|
||||
here-document
|
||||
comsub here-string
|
||||
|
||||
+19
-9
@@ -16,30 +16,40 @@
|
||||
shopt -s expand_aliases
|
||||
|
||||
# single alias definition contains entire here-document
|
||||
alias 'foo=cat <<EOF
|
||||
alias 'heredoc=cat <<EOF
|
||||
hello
|
||||
world
|
||||
EOF'
|
||||
foo
|
||||
heredoc
|
||||
|
||||
# here-document body continues after alias definition
|
||||
alias 'foo=cat <<EOF
|
||||
alias 'headplus=cat <<EOF
|
||||
hello'
|
||||
foo
|
||||
headplus
|
||||
world
|
||||
EOF
|
||||
|
||||
unalias heredoc headplus
|
||||
|
||||
alias head='cat <<END'
|
||||
|
||||
head
|
||||
here-doc line 1
|
||||
here-doc line 2
|
||||
END
|
||||
|
||||
# here-document delimiter in one alias, body in another
|
||||
shopt -s expand_aliases
|
||||
alias c='cat <<\END' d='c
|
||||
alias head='cat <<\END' body='head
|
||||
here-document
|
||||
END'
|
||||
d
|
||||
body
|
||||
|
||||
# make sure delimiter is recognized whether the alias ends with a newline or not
|
||||
shopt -s expand_aliases
|
||||
alias c='cat <<\END' d='c
|
||||
alias head='cat <<\END' body='head
|
||||
here-document
|
||||
END
|
||||
'
|
||||
d
|
||||
body
|
||||
|
||||
unalias head body
|
||||
|
||||
@@ -134,6 +134,11 @@ EOF
|
||||
);
|
||||
echo "coprocs created"
|
||||
}
|
||||
mkcoprocs is a function
|
||||
mkcoprocs ()
|
||||
{
|
||||
coproc cat -u - & read -u ${COPROC[0]} msg
|
||||
}
|
||||
cat is /bin/cat
|
||||
cat is aliased to `echo cat'
|
||||
/bin/cat
|
||||
|
||||
@@ -54,3 +54,13 @@ echo "coprocs created"
|
||||
}
|
||||
|
||||
type mkcoprocs
|
||||
|
||||
unset -f mkcoprocs
|
||||
|
||||
# make sure that simple commands are printed without the coproc name
|
||||
mkcoprocs ()
|
||||
{
|
||||
coproc cat -u - &
|
||||
read -u ${COPROC[0]} msg
|
||||
}
|
||||
type mkcoprocs
|
||||
|
||||
Reference in New Issue
Block a user