bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another "set" option?


From: Geir Hauge
Subject: Re: Another "set" option?
Date: Wed, 10 Jul 2013 19:35:21 +0200

2013/7/10 Bruce Korb <bruce.korb@gmail.com>

> This seems like a lot of obtuse bother:
>
> xtrace_setting=$(
>    re=$'\nxtrace[ \t]+on'
>    [[ $(set -o) =~ $re ]] && echo ' -x' || echo ' +x')
>
> if there were only some magic like ${BASH_SETTING_XTRACE} or
> xtrace_setting=$(set -q xtrace) or something.  Could we get
> something fairly straight forward for querying set/shopt state?
> Thank you for considering.  Regards, Bruce
>

shopt -qo xtrace && xtrace=1




-- 
Geir Hauge


reply via email to

[Prev in Thread] Current Thread [Next in Thread]