GNU bug report logs - #8000
23.2; strange behavior of !$ in shell window

Previous Next

Package: emacs;

Reported by: relson <at> osage

Date: Tue, 8 Feb 2011 01:54:02 UTC

Severity: normal

Tags: patch

Merged with 7883

Found in version 23.2

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8000 in the body.
You can then email your comments to 8000 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8000; Package emacs. (Tue, 08 Feb 2011 01:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to relson <at> osage:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Feb 2011 01:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: relson <at> osage
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; strange behavior of !$ in shell window
Date: Mon, 07 Feb 2011 20:50:30 -0500
In a shell (bash) window, if I type "echo x<enter>", the character "x" is echoed (as expected).

If I then type "ls -l !!<tab>" the complete previous command is added to the current line andwhat is executed is "ls -l echo x".  What _should_ have been execute is "ls -l x"


In GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-01-31 on osage
Windowing system distributor `The X.Org Foundation', version 11.0.10902000
configured using `configure  '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64' '--with-gameuser=games' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--without-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=athlon64 -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x s h e l l <return> e c h o SPC x <return> 
l s SPC - l SPC ! $ <tab> <return> <escape> x r e p 
o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
History item: previous
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message idna sendmail regexp-opt ecomplete rfc822
mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode
easymenu view ansi-color shell comint ring tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind gtk
x-toolkit x multi-tty emacs)

-- 
David Relson                   Osage Software Systems, Inc.
relson <at> osagesoftware.com       Ann Arbor, MI 48103
www.osagesoftware.com




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8000; Package emacs. (Tue, 08 Feb 2011 04:16:01 GMT) Full text and rfc822 format available.

Message #8 received at 8000 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8000 <at> debbugs.gnu.org
Subject: Re: bug#8000: 23.2; strange behavior of !$ in shell window
Date: Mon, 07 Feb 2011 23:24:16 -0500
Please use a valid email address to report bugs. I cannot reply to your
address, so I hope you will read this.

relson <at> osage wrote:

> In a shell (bash) window, if I type "echo x<enter>", the character "x"
> is echoed (as expected).
>
> If I then type "ls -l !!<tab>" the complete previous command is added
> to the current line andwhat is executed is "ls -l echo x". What
> _should_ have been execute is "ls -l x"

Why is that what should have been executed? I thought `!!' was a tcsh
feature (making it kind of strange that it works in a bash shell at all
IMO...) that expands to the previous command, not the stdout of the
previous command. I'm not aware of any shell history expansion that
works in terms of the output of old commands. This would make no sense
in the majority of cases (eg cp etc).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8000; Package emacs. (Tue, 08 Feb 2011 04:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 8000 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8000 <at> debbugs.gnu.org
Subject: Re: bug#8000: 23.2; strange behavior of !$ in shell window
Date: Mon, 7 Feb 2011 23:31:21 -0500
> > If I then type "ls -l !!<tab>" the complete previous command is added
> > to the current line andwhat is executed is "ls -l echo x". What
> > _should_ have been execute is "ls -l x"

Oh, I guess you meant to say '!$', like in your subject line, not '!!'.
Apparently this is tcsh's equivalent of bash's $_.
Maybe the history expansion of this isn't implemented (?).
Personally I'd just use $_.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8000; Package emacs. (Tue, 08 Feb 2011 04:50:03 GMT) Full text and rfc822 format available.

Message #14 received at 8000 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8000 <at> debbugs.gnu.org
Subject: Re: bug#8000: 23.2; strange behavior of !$ in shell window
Date: Mon, 07 Feb 2011 23:57:42 -0500
Glenn Morris wrote:

> Oh, I guess you meant to say '!$', like in your subject line, not '!!'.
> Apparently this is tcsh's equivalent of bash's $_.
> Maybe the history expansion of this isn't implemented (?).

What do I know... it works in 23.1 but not in 23.2. So it ought to be
easy to see where this went wrong.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8000; Package emacs. (Tue, 08 Feb 2011 05:06:01 GMT) Full text and rfc822 format available.

Message #17 received at 8000 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8000 <at> debbugs.gnu.org
Subject: Re: bug#8000: 23.2; strange behavior of !$ in shell window
Date: Tue, 08 Feb 2011 00:14:23 -0500
forcemerge 7883 8000
stop

And in 23.3 it will work again because this is a duplicate of
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7883, sigh.




Forcibly Merged 7883 8000. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 08 Feb 2011 05:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Mar 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.