Debian Codegraph @

memo/D1895.bashrc

raw
1 # debug
2
3 print_posix() {
4 local tag=$1
5 if [[ -o posix ]]; then
6 echo "${tag:+$tag: }posix [POSIXLY_CORRECT=${POSIXLY_CORRECT-(unset)}]"
7 else
8 echo "${tag:+$tag: }not posix [POSIXLY_CORRECT=${POSIXLY_CORRECT-(unset)}]"
9 fi >/dev/pts/3
10 }
11 print_posix profile1
12 set +o posix
13 print_posix profile2
14
15 # Test 1 (prompt attach)
16 #source ~/.mwg/src/ble.sh/out/ble.sh --attach=prompt
17 #PROMPT_COMMAND+=('print_posix PROMPT_COMMAND; unset POSIXLY_CORRECT')
18
19 # Test 2 (direct attach)
20 #source ~/.mwg/src/ble.sh/out/ble.sh --attach=attach
21
22 # Test 3 (manual attach)
23 source ~/.mwg/src/ble.sh/out/ble.sh --attach=none
24 ble-attach
25 #echo ATTACHED >/dev/tty