Files
bash/tests/histexp5.sub
T
2019-01-07 09:27:52 -05:00

29 lines
555 B
Plaintext

set -o history
set -o histexpand
# command and process substitutions should be tokenized as a single word
echo /$(echo tmp)/Step1
echo !:*
echo /<(echo tmp)/Step1 >/dev/null
echo !:*
# same tests at the beginning of a word
echo $(echo /tmp)/Step1
echo !:*
echo <(echo /tmp)/Step1 >/dev/null
echo !:*
# so should shell extended glob patterns
shopt -s extglob
echo /+(one|two|three)/Step1
echo !:*
echo /*(tmp|dev|usr)/Step1
echo !:*
# same tests at the beginning of a word
echo +(/one|/two|/three)/Step1
echo !:*
echo *(/tmp|/dev|/usr)/Step1
echo !:*