Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15607
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Jim Monte <jim.monte01@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Issues with history substitution and its documentation |
| Date | Mon, 18 Nov 2019 12:40:13 -0500 |
| Lines | 36 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1871.1574098837.13325.bug-bash@gnu.org> (permalink) |
| References | <CA+VKLw-WX8zUz06MZ9ThuMhUuW97aJ5ted8oSfJSvrVJBLW3hA@mail.gmail.com> <CA+VKLw_XMx1xjiFt-Tio8S+Mdt_AeS9v64SuMYYMdDdDnJFSBQ@mail.gmail.com> <CA+VKLw_hceb_xzu7kzTJAVuegWzqxJDa8xw4ja5TOBPpOWvRDQ@mail.gmail.com> <CA+VKLw_dh_SgozSCqqeg0SBTacx6PyobJff6Thu6uuV-LPCdeQ@mail.gmail.com> <CA+VKLw9c9B5FNg=48rE1v=mjZ-9Xnj9hyeyuJ0LcOYJZiMp=rQ@mail.gmail.com> <8e690ee5-4afd-e45d-f3c5-8a69f61139dd@case.edu> <CA+VKLw9CsVJxSCKDB4=_Jd=w3SrutiB2G7k1WX8g8h8-EjggpQ@mail.gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Trace | usenet.stanford.edu 1574098837 21137 209.51.188.17 (18 Nov 2019 17:40:37 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | Chester Ramey <chet.ramey@case.edu> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wcp67qOk42IHv1kb7tebvXqOcCkcCvC7y2X2xHXZvpE=; b=O4t7UgJ6cWd56HZ9h9OIQTv+0ggINq4lX+YTTfGW9lPSD/m5x4LuCerFtzR/TNYaV+ +JgggEhneMikddQdzj1OGOI5eOHAfiYkEhTfwCEQbJtq5FIPo+/hIsw0jjOWwFsWqQlS gi0b/c/DemssMENkGKsrnu+dVsqD4i/OdYBgm/XFhsJ6phl8kn0kYM2+xSn/202Qms8i hjMa/Knhf2/IxZXyrX7o/CfMARAy6qm9uje+Hvbn8XzOQcxph+cTqA1UzQCv46fzkuIg 6GOLtlYNmewjWDCp92wTyodobwQ8ZW8xmpoG2tRbn0BB26TytiecCH7PnW/jHVQ/BR0W JXXg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wcp67qOk42IHv1kb7tebvXqOcCkcCvC7y2X2xHXZvpE=; b=dp9DHRNG+FUc4+p8gvvu7UWT+4syvX6mWJj+DwaswsOtmsAwJhCmMk+ZGCW2GNnufw zkP0MDfQMv7HSJHhrd2F1zjeH9bdEXzKQZwlhOFGUhl+sQstuAkxatYxQCaOlxhi88Pd y4b3128YxlfOg72YUR06rTveYehtUL7QP+AbmyJzWJHkk0jbDDqSfJQokz5FOb6+VO+M E+rEFdtkSBLI37WdaB+zg8dgB3kf09kSpefT4RIe4EDTJiimKFLpztHt7lNaARnVpCae lj+2BgLcAh/00vcXBibQR4iuxefJYFnCYfSFhMPea0jOT9c/RFUURfPsMxk7nQqLNocR 1d1g== |
| X-Gm-Message-State | APjAAAUYHjz9iExoN1fXM/yvNNGUSBN5UX/Lcb+V5ImZGdOUi8OMrXh2 2jqe1c8vSyIYCyBtAMx364wYchG29wl+bAuotNw= |
| X-Google-Smtp-Source | APXvYqwZZUSNS1L6JGssV2YYYfMjnanjZ8JjJtpRFOkz2jRnBz5xxXcu4X6drQT+8Cd3m4G7YPwQyeeXKPCC9gr9ZiU= |
| X-Received | by 2002:a6b:c98e:: with SMTP id z136mr2109277iof.15.1574098824841; Mon, 18 Nov 2019 09:40:24 -0800 (PST) |
| In-Reply-To | <8e690ee5-4afd-e45d-f3c5-8a69f61139dd@case.edu> |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2607:f8b0:4864:20::d2f |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.23 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CA+VKLw9CsVJxSCKDB4=_Jd=w3SrutiB2G7k1WX8g8h8-EjggpQ@mail.gmail.com> |
| X-Mailman-Original-References | <CA+VKLw-WX8zUz06MZ9ThuMhUuW97aJ5ted8oSfJSvrVJBLW3hA@mail.gmail.com> <CA+VKLw_XMx1xjiFt-Tio8S+Mdt_AeS9v64SuMYYMdDdDnJFSBQ@mail.gmail.com> <CA+VKLw_hceb_xzu7kzTJAVuegWzqxJDa8xw4ja5TOBPpOWvRDQ@mail.gmail.com> <CA+VKLw_dh_SgozSCqqeg0SBTacx6PyobJff6Thu6uuV-LPCdeQ@mail.gmail.com> <CA+VKLw9c9B5FNg=48rE1v=mjZ-9Xnj9hyeyuJ0LcOYJZiMp=rQ@mail.gmail.com> <8e690ee5-4afd-e45d-f3c5-8a69f61139dd@case.edu> |
| Xref | csiph.com gnu.bash.bug:15607 |
Show key headers only | View raw
Thank you for looking into all of these reports. My issue here was that in both cases there had not yet been any ?string? search, so they should behave the same way -- an event is not required to not have a most recent ?string? search. So if the default is to use an empty string as the previous string when there is none, for consistency from the perspective of the user, both instances of echo "!%" should output echo "" as the second one does. [root@localhost ~]# bash [root@localhost ~]# echo "!%" bash: !: event not found [root@localhost ~]# echo a >/dev/nul [root@localhost ~]# echo "!%" echo "" Jim On Mon, Nov 18, 2019 at 11:20 AM Chet Ramey <chet.ramey@case.edu> wrote: > On 11/5/19 11:44 AM, Jim Monte wrote: > > The availability of the % string only after a command unrelated to it > (not > > using !??) is executed as shown below is not documented, but it probably > > falls under the category of a bug. That is, it seems reasonable that both > > echo "!%" commands should behave as the second one does. > > [root@localhost ~]# bash > > [root@localhost ~]# echo "!%" > > bash: !: event not found > > If there is no history list, and hence no history entries, there are no > events to find. Hence the error message. > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/ >
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Issues with history substitution and its documentation Jim Monte <jim.monte01@gmail.com> - 2019-11-18 12:40 -0500
csiph-web