GNU bug report logs - #31765
26.1; Can't define alias for git in eshell

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Sat, 9 Jun 2018 03:00:01 UTC

Severity: normal

Tags: fixed, notabug, patch

Merged with 27954

Found in versions 25.2, 26.1

Done: npostavs <at> users.sourceforge.net

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 31765 in the body.
You can then email your comments to 31765 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 bug-gnu-emacs <at> gnu.org:
bug#31765; Package emacs. (Sat, 09 Jun 2018 03:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Jun 2018 03:00:02 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; Can't define alias for git in eshell
Date: Fri, 08 Jun 2018 23:59:00 -0300
Try

    alias g git

then

    g log

or whatever inside a git repo. It always show the git help page, as in a
faulty git invocation.

---

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Manjaro Linux

Recent messages:
History item: 1
Completion function pcomplete-completions-at-point uses a deprecated calling convention
Saving file /home/carlos/.emacs.d/eshell/alias...
Wrote /home/carlos/.emacs.d/eshell/alias
History item: 128
History item: 127
History item: 126
No completions of /u
Saving file /home/carlos/.emacs.d/eshell/alias...
Wrote /home/carlos/.emacs.d/eshell/alias

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Eshell

Minor modes in effect:
  diff-auto-refine-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  winner-mode: t
  show-paren-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  global-company-mode: t
  company-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail pp cl-print
em-rebind em-smart em-tramp vc-git em-unix em-term term disp-table ehelp
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias display-line-numbers checkdoc flymake-proc
flymake warnings doom-themes-org cl-extra yasnippet elec-pair
highlight-indentation help-fns radix-tree help-mode elpy
find-file-in-project ivy delsel ivy-overlay ffap thingatpt windmove
diff-mode easy-mmode elpy-shell pyvenv esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
elpy-profile elpy-django elpy-refactor subr-x python tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time format-spec advice json map grep compile comint ansi-color
files-x company-oddmuse company-keywords company-etags etags xref
project company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
doom-tomorrow-night-theme doom-themes doom-themes-common winner ring
paren ido-completing-read+ memoize s cus-edit minibuf-eldef ido gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr wid-edit company edmacro kmacro pcase
cus-start cus-load finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib server time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 476026 39124)
 (symbols 48 35670 2)
 (miscs 40 110 213)
 (strings 32 89797 2087)
 (string-bytes 1 2456578)
 (vectors 16 56718)
 (vector-slots 8 960760 10308)
 (floats 8 205 261)
 (intervals 56 1299 126)
 (buffers 992 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31765; Package emacs. (Sat, 09 Jun 2018 03:10:02 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 26.1; Can't define alias for git in eshell
Date: Sat, 9 Jun 2018 00:08:55 -0300
I found out that defining the alias as

   alias g 'git $*'

works. The documentation is unclear in this regard. See for example:

   https://www.gnu.org/software/emacs/manual/html_node/eshell/Aliases.html

It seems to imply that, like in bash, arguments following the alias
will be passed to the aliased command as usual.


On Fri, Jun 8, 2018 at 11:59 PM, Carlos Pita <carlosjosepita <at> gmail.com> wrote:
> Try
>
>     alias g git
>
> then
>
>     g log
>
> or whatever inside a git repo. It always show the git help page, as in a
> faulty git invocation.
>
> ---
>
> In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
>  of 2018-05-29 built on juergen
> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
> System Description:     Manjaro Linux
>
> Recent messages:
> History item: 1
> Completion function pcomplete-completions-at-point uses a deprecated calling convention
> Saving file /home/carlos/.emacs.d/eshell/alias...
> Wrote /home/carlos/.emacs.d/eshell/alias
> History item: 128
> History item: 127
> History item: 126
> No completions of /u
> Saving file /home/carlos/.emacs.d/eshell/alias...
> Wrote /home/carlos/.emacs.d/eshell/alias
>
> Configured using:
>  'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
>  --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
>  'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
>  -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
>  LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
>
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
> ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
> GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
>
> Important settings:
>   value of $LC_MONETARY: en_US.UTF-8
>   value of $LC_NUMERIC: en_US.UTF-8
>   value of $LC_TIME: en_US.UTF-8
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Eshell
>
> Minor modes in effect:
>   diff-auto-refine-mode: t
>   pyvenv-mode: t
>   shell-dirtrack-mode: t
>   winner-mode: t
>   show-paren-mode: t
>   ido-ubiquitous-mode: t
>   ido-everywhere: t
>   global-company-mode: t
>   company-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   column-number-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
> rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
> mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail pp cl-print
> em-rebind em-smart em-tramp vc-git em-unix em-term term disp-table ehelp
> em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
> em-basic em-banner em-alias display-line-numbers checkdoc flymake-proc
> flymake warnings doom-themes-org cl-extra yasnippet elec-pair
> highlight-indentation help-fns radix-tree help-mode elpy
> find-file-in-project ivy delsel ivy-overlay ffap thingatpt windmove
> diff-mode easy-mmode elpy-shell pyvenv esh-var esh-io esh-cmd esh-opt
> esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
> elpy-profile elpy-django elpy-refactor subr-x python tramp-sh tramp
> tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
> parse-time format-spec advice json map grep compile comint ansi-color
> files-x company-oddmuse company-keywords company-etags etags xref
> project company-gtags company-dabbrev-code company-dabbrev company-files
> company-capf company-cmake company-xcode company-clang company-semantic
> company-eclim company-template company-css company-nxml company-bbdb
> doom-tomorrow-night-theme doom-themes doom-themes-common winner ring
> paren ido-completing-read+ memoize s cus-edit minibuf-eldef ido gnus
> nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
> mail-utils mm-util mail-prsvr wid-edit company edmacro kmacro pcase
> cus-start cus-load finder-inf info package easymenu epg-config
> url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
> eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
> byte-compile cconv cl-loaddefs cl-lib server time-date mule-util tooltip
> eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
> term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
> regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
> lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
> select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
> term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
> vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
> hebrew greek romanian slovak czech european ethiopic indian cyrillic
> chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
> help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
> button faces cus-face macroexp files text-properties overlay sha1 md5
> base64 format env code-pages mule custom widget hashtable-print-readable
> backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty
> make-network-process emacs)
>
> Memory information:
> ((conses 16 476026 39124)
>  (symbols 48 35670 2)
>  (miscs 40 110 213)
>  (strings 32 89797 2087)
>  (string-bytes 1 2456578)
>  (vectors 16 56718)
>  (vector-slots 8 960760 10308)
>  (floats 8 205 261)
>  (intervals 56 1299 126)
>  (buffers 992 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31765; Package emacs. (Sat, 09 Jun 2018 15:36:01 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 26.1; Can't define alias for git in eshell
Date: Sat, 9 Jun 2018 12:35:05 -0300
By trial & error I came to the conclusion that the "juxtaposition"
case is not valid anymore. The example in the documentation:

     > For example, ll is a common alias for ls -l, and would be defined
     > with the command invocation ‘alias ll ls -l’; with this defined,
     > running ‘ll foo’ in Eshell will actually run ‘ls -l foo’.

plainly fails, it doesn't list foo but the current directory, foo is
simply ignored. The correct way seems to be:

     alias ll 'ls -l $*'

which is not documented (not even in the draft guide [1]).

---

[1] https://www.gnu.org/software/emacs/draft/manual/html_node/eshell/Aliases.html#Aliases




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31765; Package emacs. (Sat, 09 Jun 2018 19:35:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: Nicolas Petton <nicolas <at> petton.fr>, 31765 <at> debbugs.gnu.org
Subject: Re: bug#31765: 26.1; Can't define alias for git in eshell
Date: Sat, 09 Jun 2018 15:34:17 -0400
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> The correct way seems to be:
>
>      alias ll 'ls -l $*'
>
> which is not documented (not even in the draft guide [1]).
>
> ---
>
> [1] https://www.gnu.org/software/emacs/draft/manual/html_node/eshell/Aliases.html#Aliases

Yes, this is documented in the Eshell manual, try

<f1> i g (eshell)Aliases RET

But the manual on the web doesn't seem to be updated.  Nicolas, I think
you've been updating the web manuals, right?

See also Bug#27954 and Bug#28568.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27954
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28568




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31765; Package emacs. (Wed, 11 Jul 2018 13:12:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 31765 <at> debbugs.gnu.org
Subject: Re: bug#31765: 26.1; Can't define alias for git in eshell
Date: Wed, 11 Jul 2018 09:11:50 -0400
unarchive 27954
forcemerge 27954 31765
quit

Carlos Pita <carlosjosepita <at> gmail.com> writes:

> By trial & error I came to the conclusion that the "juxtaposition"
> case is not valid anymore. The example in the documentation:
>
>      > For example, ll is a common alias for ls -l, and would be defined
>      > with the command invocation ‘alias ll ls -l’; with this defined,
>      > running ‘ll foo’ in Eshell will actually run ‘ls -l foo’.
>
> plainly fails, it doesn't list foo but the current directory, foo is
> simply ignored.

The manual on the web now seems to be updated.

https://www.gnu.org/software/emacs/manual/html_node/eshell/Aliases.html






Forcibly Merged 27954 31765. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 11 Jul 2018 13:12: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. (Thu, 09 Aug 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 234 days ago.

Previous Next


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