zwild/eshell-prompt-extras

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

Closed this issue · 1 comments

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

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