subshell term too much tricky

This commit is contained in:
pvincent
2026-07-18 13:01:34 +04:00
parent 37fa64c5b9
commit 089553cf3a
2 changed files with 46 additions and 8 deletions
+17 -2
View File
@@ -7,11 +7,26 @@ readonly BASEDIR
# SCENARII
function do_pipe_error {
function do_subshell_term {
# grep nope nope
echo "found=$(grep nope nope)"
}
function do_last_false {
# FIXME: provides error detection
! true
}
function do_unbound_associative {
declare -A associative
associative['A']='Abc'
# this is fine
[[ -v associative['A'] ]] && echo "${associative['A']}"
true
[[ -v associative['B'] ]] && echo "${associative['B']}"
# this fails
echo "${associative['B']}"
}
function do_false {