diff --git a/README.md b/README.md index 42f9095..a01895e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ # swline -Cute shell \ No newline at end of file +Cute shell +add this to your bashrc I guess + +```bash +function _update_ps1() { + PS1=$(swline $?) +} + +if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then + PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" +fi +``` \ No newline at end of file