BASH: More on the "silly" script idea.
Background: http://www.linuxquestions.org/questi...t-idea-869866/
Well, it won't switch -- keeps telling me histexpand is off. I suppose it's because it is in the subshell invoked with my slashbang (sic) line. So how would one go about getting the "real" state of histexpand, for the shell that starts when my dotfiles are sourced? I pared down one part of the script to read: Code:
c=$(set -o | grep histexpand) Code:
histexpand off Meanwhile, Code:
set -o | grep histexpand So how would one get the parent shell state, if that's the right term for it? Looking forward to a reply. BZT |
Well, doing a quick 'help set' revealed that you can do the following:
Code:
set -H Code:
histexpand on Code:
if [[ "$c" =~ *on* ]]; then |
All times are GMT -5. The time now is 04:17 AM. |