help-bash
[Top][All Lists]
Advanced

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

Re: Help-bash Digest, Vol 144, Issue 20


From: Budi
Subject: Re: Help-bash Digest, Vol 144, Issue 20
Date: Sat, 21 Oct 2023 23:17:13 +0700

1) When writing a prompt, in interactive mode.
2) When writing an error.
3) When writing xtrace lines, unless BASH_XTRACEFD is changed.
4) When writing job control messages.

Imho, none for exact, but the combination simply :


" When writing an error occurs when writing xtrace lines of executed
script/codes (with set -x)"

So any workaround solution as xtrace itself has been stderr..




On 10/21/23, help-bash-request@gnu.org <help-bash-request@gnu.org> wrote:
> Send Help-bash mailing list submissions to
>       help-bash@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.gnu.org/mailman/listinfo/help-bash
> or, via email, send a message with subject or body 'help' to
>       help-bash-request@gnu.org
>
> You can reach the person managing the list at
>       help-bash-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-bash digest..."
>
>
> Today's Topics:
>
>    1. Re: could there be a bash built-in that allows executing
>       readline functions? (Christoph Anton Mitterer)
>    2. Help definitve way to set font color.. (Budi)
>    3. Re: Help definitve way to set font color.. (Greg Wooledge)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 21 Oct 2023 02:30:30 +0200
> From: Christoph Anton Mitterer <calestyo@scientia.org>
> To: Koichi Murase <myoga.murase@gmail.com>
> Cc: help-bash@gnu.org
> Subject: Re: could there be a bash built-in that allows executing
>       readline functions?
> Message-ID:
>       <f18355426ba44d1f5064a08f62520465f47275de.camel@scientia.org>
> Content-Type: text/plain; charset="UTF-8"
>
> Hey.
>
>
> I hope thinking loudly about such an idea isn't considered heresy and I
> get banned or worse. ;-)
>
>
> >From the main thread:
>
> On Fri, 2023-10-20 at 15:56 +0900, Koichi Murase wrote:
>> Even if there was no sequence issue, utilizing the terminal's
>> response
>> doesn't seem right to me.
>
> It's not that I'd be such a super fan of this. It just doesn't feel
> right to me, to statically set some arbitrary keyseqs and hope for the
> best that this breaks nothing else and that nothing else breaks my
> stuff.
> But yes, I can very well see your points, that "my" approach has also
> it's drawbacks and is also a hack.
>
>
> Maybe all this is wrong... both approaches seem fragile in one or
> another.
>
>
>
> Would it be feasible to get functionality in bash, to call some
> readline function via a special built in, as if a bound key would have
> been pressed?
>
>
>
> I mean that would make things super easy, wouldn't it?
>
>    bind -x '"\ec": dir="$(find) | fzf)"; store_current_readline;
> READLINE_LINE="$dir"; magic_built_in accept-line; restore_old_readline'
>
>
> No more voodoo with terminal sequences, no more juggling with binds, no
> risk for collisions, no need to store stuff in global variables.
>
> The worst thing that could happen is that the bash version was too old,
> and one would need to abort.
> [And perhaps getting unpopular with the friendly bash-maintainers who
> one would ask for such feature.]
>
>
> Cheers,
> Chris.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 21 Oct 2023 22:14:19 +0700
> From: Budi <budikusasi@gmail.com>
> To: help-bash@gnu.org
> Subject: Help definitve way to set font color..
> Message-ID:
>       <CAH0GyZAOOzoECxgt9KJy6UiofRwXEkQUif_1fwpv938f+-Z2Cg@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> How is definitve way to do coloring Bash stderr output that exist in
> between xtace lines (and on any time/situation elese) ?
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 21 Oct 2023 11:51:11 -0400
> From: Greg Wooledge <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Help definitve way to set font color..
> Message-ID: <ZTPzb7cb2X6BOrr4@wooledge.org>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, Oct 21, 2023 at 10:14:19PM +0700, Budi wrote:
>> How is definitve way to do coloring [...]
>
> https://mywiki.wooledge.org/BashFAQ/037
>
>> [...] Bash stderr output that exist in
>> between xtace lines (and on any time/situation elese) ?
>
> Bash does not write output "between xtrace lines" unless an error
> occurs.
>
> I really think you are laboring under some sort of massive misconception,
> but your text is so terse that it's hard to pinpoint exactly what
> confusion you're dealing with.
>
> Bash writes to stderr under these circumstances:
>
> 1) When writing a prompt, in interactive mode.
> 2) When writing an error.
> 3) When writing xtrace lines, unless BASH_XTRACEFD is changed.
> 4) When writing job control messages.
>
> Unless I've forgotten something, any other output written to stderr
> comes from a *command* that bash executes.
>
> What *exactly* are you trying to do?
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Help-bash mailing list
> Help-bash@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-bash
>
>
> ------------------------------
>
> End of Help-bash Digest, Vol 144, Issue 20
> ******************************************
>



reply via email to

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