Re: IGNOREEOF and POSIXLY_CORRECT don't ignore invisible vars

2016-06-18 Thread Linda Walsh







Grisha Levit wrote:
The manual references these values being set, not just declared, so 
maybe should check for invisible_p?

---
Why?  I.e. what were you wanting to happen?


Noticeable for example because this works:

$ set +o posix; f() { local POSIXLY_CORRECT=; shopt -p -o posix; }; f; 
shopt -p -o posix

set -o posix
set +o posix

---
Yeah, you've set P_C to a null string.


But the opposite does not:

$ set -o posix; f() { local POSIXLY_CORRECT; shopt -p -o posix; }; f; 
shopt -p -o posix

set -o posix
set -o posix

---
The "opposite"?  You aren't really showing the opposite.  I.e.
wouldn't the opposite be (alias used for printing P_C & output of shopt)

 alias shopos='printf "PC=%s; " $(if [[ -v POSIXLY_CORRECT ]]; then 

printf "  set"; else printf "unset"; fi) ;shopt -p -o posix'

 set -o posix; f() { local POSIXLY_CORRECT; unset POSIXLY_CORRECT; 
printf "   in f: "; shopos; }; printf "bfore f: "; shopos; f ; printf 
"after f: "; shopos

bfore f: PC=set; set -o posix
  in f: PC=unset; set -o posix
after f: PC=set; set -o posix

(and your first example:)

 set +o posix; f() { local POSIXLY_CORRECT=;  printf "   in f: "; 

shopos; }; printf "bfore f: "; shopos; f ; printf "after f: "; shopos
bfore f: PC=unset; set +o posix
  in f: PC=set; set -o posix
after f: PC=unset; set +o posix





Re: Mulit-line aliases and PROMPT_COMMAND

2016-06-18 Thread Linda Walsh




Dan Douglas wrote:

 The 4.4 changes will make aliases even more interesting.
  

---
Oh?   Why is that?  I.e. what's happening to aliases that
will make them more "interesting"? 


BTW, are you using "interesting" in the same way as the
saying "May you live in interesting times"?