[LRUG] Last exit status in bash prompt
Jim Myhrberg
contact at jimeh.me
Tue Jan 10 04:24:41 PST 2012
It took me a couple of hours just to switch from bash to zsh, 10-15 minutes adjusting certain things in my dotfiles, and the rest to play with and configure the new toys in zsh :)
On Tuesday, 10 January 2012 at 12:22, Andrew Stewart wrote:
>
> On 9 Jan 2012, at 15:20, Andrew Stewart wrote:
> > I'm having trouble incorporating the exit status of the last command into my bash prompt. My prompt executes a couple of commands to display the current Ruby version and the current git status, and then I want to use the exit status of the last command to control the colour of the final character (e.g. $).
>
>
> Thanks everyone for your help and suggestions. It was interesting looking at the different solutions. In the end I went with Viktor's method of setting up PS1 in PROMPT_COMMAND.
>
> https://github.com/airblade/dotfiles/blob/master/bash/prompt
>
> As for switching to zsh, I've intended to ever since reading "From Bash to Z Shell" by Kiddle, Peek, and Stephenson about three years ago! One day I'll switch.
>
> Thanks again,
> Andy
> -------
> http://airbladesoftware.com
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org (mailto:Chat at lists.lrug.org)
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120110/e1dc8677/attachment-0003.html>
More information about the Chat
mailing list