Skip to content

Shell include that shows the status of the last-executed process

License

Notifications You must be signed in to change notification settings

FGasper/pretty-exit-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

pretty-exit-status.sh

Shell include that shows the status of the last-executed process

To use:

  1. Save pretty-exit-status.sh somewhere sensible. (e.g., ~/.pretty_exit_status.sh)

  2. In your .bashrc or .bash_profile add the following:

source ~/.pretty_exit_status.sh

(or wherever you saved the script)

  1. Later on in that same .bashrc or .bash_profile, put the following somewhere in the PS1 variable:
$(pretty_exit_status $?)

For example, if you just want to prefix your current prompt, just do:

export PS1='$(pretty_exit_status $?)\n'$PS1

That’s it! :)

About

Shell include that shows the status of the last-executed process

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages