eshell-prompt-extras icon indicating copy to clipboard operation
eshell-prompt-extras copied to clipboard

Is there a way showing the last process's exit status

Open dolmens opened this issue 5 years ago • 1 comments

Like https://github.com/magicmonty/bash-git-prompt I found it is extremely useful, saving my life from `echo $?'.

dolmens avatar Apr 08 '19 15:04 dolmens

There is eshell-last-command-status, keep mind that it's always 0 for Lisp functions since "exit status" doesn't make sense there, e.g.,

~ $ ls /path/to/nowhere
/path/to/nowhere: No such file or directory
~ $ echo $?
0
~ $ which ls
eshell/ls is a compiled Lisp function in `em-ls.el'.


~ $ *ls /path/to/nowhere
ls: /path/to/nowhere: No such file or directory
~ $ echo $?
1

xuchunyang avatar Apr 08 '19 16:04 xuchunyang