From 375013e066441e50c205bbbfbab8e59f1e735747 Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 13 Nov 2024 15:57:48 -0800 Subject: [PATCH] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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