Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15634
| Path | csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Chet Ramey <chet.ramey@case.edu> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: What should be the expected behavior for $_ ? |
| Date | Mon, 25 Nov 2019 09:33:27 -0500 |
| Lines | 23 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.2579.1574692426.13325.bug-bash@gnu.org> (permalink) |
| References | <880841828.14107306.1522764210557.JavaMail.zimbra@redhat.com> <2fbd26f8-811a-579b-7799-e2e8c6532840@case.edu> <5AC41639.6010006@tlinx.org> <621305317.18102863.1574691664255.JavaMail.zimbra@redhat.com> <3a6620a7-0d5d-97c9-58ac-47419ddfbfb1@case.edu> |
| Reply-To | chet.ramey@case.edu |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1574692426 3810 209.51.188.17 (25 Nov 2019 14:33:46 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | chet.ramey@case.edu, bug-bash@gnu.org |
| To | Siteshwar Vashisht <svashisht@redhat.com> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574692419; bh=J1nD+EHc5Ng916BssJA3KuNstLAUJqVbuhcwgPiv8WI=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=MMz0D4SeeigAW3DuqVwn3H0OBD7LHLwMePynqnJTdGPtVYj2AdZ2xM8lipm/mPSJMj INUhbcBgV+LoXUnXVaLPogbRClUP62d7lNFCH2g8oVn1yBx0FtnpMLhYBURv8tCPup3 lFIUx/cRcDoCd5CEe9W4+S1nIgJIXVz5qmBM5+mtBfaNKFA3u4nWQfX0WNCfZZqC2CK T5iOQ8tXLORcHqV1ZqxMHEcy4aDkSE2gfbyXhC0eJkUJrjqQeIWv2oXUYWnVap+dYry wZE9kt8j3Y1swVVSjKvM35/RgOhaPcMA7WzJXnFfP6AAN6o+qT1U8Alcd/kDzk8At3g HZL+vDhw== |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574692418; bh=NPII0llitGymV5iV9yf5fuoLPTwmJkTLaYEZbkJa9LM=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ZtbBeNS0JmnmqtJCOujm8BAj+Dh4+6hsB4PCb9CEEgXn13hNdp8QYtsIqHiZ5F9C2H XcnYyuLca83m/vkzLgKauMFwBkfspUuc2Ql49mcqySXcfHd9i/0kNACtpydHjvAS8dT 1tGM2THuUE5hH/yVcLCZb90VoCKIpsFPRANLZCTrUMCmP4hBWsuxyM/8hq09giwuOX2 QpQGfdnwsTghiPDXnnnxg7odrtglqO49kc3a6SDLPDTHHKq9w5RJ3bBmbcYULlkbbGl 7Y5oQui7CpBqPpJlVVf4MnmWy/oNevTShZIolCfSO7OJrJtP9eo0D1IS6Xx2bdpd+n4 eZhazzdA== |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
| In-Reply-To | <621305317.18102863.1574691664255.JavaMail.zimbra@redhat.com> |
| Content-Language | en-US |
| X-Junkmail-Status | score=8/90, host=mpv1-2015.case.edu |
| X-Junkmail-PrAS-Raw | score=8/90, refid=2.7.2:2019.11.25.133917:17:8.317, ip=, rules=DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_MAILTO, __URI_WITH_PATH, __URI_NO_WWW, __CP_URI_IN_BODY, __FRAUD_MONEY_CURRENCY_DOLLAR, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __FORWARDED_MSG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_900_999, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, SXL_IP_TFX_WM[202.103.22.129.fur], [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] |
| X-Received-From | 129.22.103.226 |
| 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 | <3a6620a7-0d5d-97c9-58ac-47419ddfbfb1@case.edu> |
| X-Mailman-Original-References | <880841828.14107306.1522764210557.JavaMail.zimbra@redhat.com> <2fbd26f8-811a-579b-7799-e2e8c6532840@case.edu> <5AC41639.6010006@tlinx.org> <621305317.18102863.1574691664255.JavaMail.zimbra@redhat.com> |
| Xref | csiph.com gnu.bash.bug:15634 |
Show key headers only | View raw
On 11/25/19 9:21 AM, Siteshwar Vashisht wrote: >>> It's an interesting question. You want $_ to expand to the last argument >>> (or last word) of the previous history entry when the shell is interactive, >>> which is available as !$, instead of the last command executed by the >>> current shell instance. >>> >>> Should the command line know about shell functions and commands executed in >>> the foreground on its behalf? What should the behavior be in a >>> non-interactive shell? What do folks think? > > Can we at least document this behavior in man page if we can't change it ? I think the current language works pretty well: "Subsequently, expands to the last argument to the previous simple command executed in the foreground, after expansion." -- ``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: What should be the expected behavior for $_ ? Chet Ramey <chet.ramey@case.edu> - 2019-11-25 09:33 -0500
csiph-web