Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16804

Re: How to use PROMPT_COMMAND(S) without breaking other scripts

From Koichi Murase <myoga.murase@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: How to use PROMPT_COMMAND(S) without breaking other scripts
Date 2020-08-25 04:37 +0900
Message-ID <mailman.1057.1598297848.2469.bug-bash@gnu.org> (permalink)
References (1 earlier) <17a0ba52-32ee-b9bc-72ff-3587b2050fbd@case.edu> <CAFLRLk9vNPM5NtypB2UNcDqMZfG3Lmi3zEMGfPqZNacmHCoAoA@mail.gmail.com> <0c10b76f-a7f0-1c52-77b7-4b208035956b@case.edu> <c904f5b5-1312-ac4c-26bd-bfb97c1f43e8@inlv.org> <CAFLRLk89FKrE8=BXFrQm_Zxgm-7UsHBLULwiP-pbXEsGewG5JQ@mail.gmail.com>

Show all headers | View raw


2020-08-25 1:59 Martijn Dekker <martijn@inlv.org>:
> Is it too late? I think that would actually be cleaner than adding a
> separate array, per Koichi's report.

If it's not too late to change, converting PROMPT_COMMAND to an array
looks better to me too.  As for the problem of scripts doing
`PROMPT_COMMAND=command', as suggested in the last paragraph from
Martijn, I think it is enough to initialize PROMPT_COMMAND[0] by an
empty string.

--
Koichi

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: How to use PROMPT_COMMAND(S) without breaking other scripts Koichi Murase <myoga.murase@gmail.com> - 2020-08-25 04:37 +0900

csiph-web