Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15634 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2019-11-25 09:33 -0500 |
| Last post | 2019-11-25 09:33 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: What should be the expected behavior for $_ ? Chet Ramey <chet.ramey@case.edu> - 2019-11-25 09:33 -0500
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2019-11-25 09:33 -0500 |
| Subject | Re: What should be the expected behavior for $_ ? |
| Message-ID | <mailman.2579.1574692426.13325.bug-bash@gnu.org> |
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 top | Article view | gnu.bash.bug
csiph-web