summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjstmax! <87650746+jstmaxlol@users.noreply.github.com>2024-12-11 20:14:08 +0100
committerGitHub <noreply@github.com>2024-12-11 20:14:08 +0100
commitaaa8b8f5090b86a89485cadd351d8b5f8fd31333 (patch)
treedc59e2d0c24eb7e9296efa36c201f797d94b8d2c
parent1ebdb402edf33f2b59c6fe796d83c5a0a2e08b05 (diff)
> add fish_right_prompt and update fish_prompt
-rw-r--r--jstmax_fish_prompt.fish7
-rw-r--r--jstmax_fish_prompts.fish21
2 files changed, 21 insertions, 7 deletions
diff --git a/jstmax_fish_prompt.fish b/jstmax_fish_prompt.fish
deleted file mode 100644
index 2b91fa3..0000000
--- a/jstmax_fish_prompt.fish
+++ /dev/null
@@ -1,7 +0,0 @@
-function fish_prompt
- if test "$PWD" = "/home/massi"
- echo -e (set_color green)$USER(set_color white)"@"(set_color green)"~"\n(set_color white)":: "
- else
- echo -e (set_color green)$USER(set_color white)"@"(set_color green)$PWD\n(set_color white)":: "
- end
-end
diff --git a/jstmax_fish_prompts.fish b/jstmax_fish_prompts.fish
new file mode 100644
index 0000000..95f0db9
--- /dev/null
+++ b/jstmax_fish_prompts.fish
@@ -0,0 +1,21 @@
+# fish_prompt
+function fish_prompt
+ if test "$PWD" = "/home/maxlol"
+ echo -e (set_color green)$USER(set_color white)"@"(set_color green)"~"\n(set_color white)":: "
+ else
+ echo -e (set_color green)$USER(set_color white)"@"(set_color green)$PWD\n(set_color white)":: "
+ end
+end
+
+# fish_right_prompt
+function fish_right_prompt
+ set last_status $status
+
+ # check for which color to use
+ if test $last_status -eq 0
+ set color green
+ else
+ set color red
+ end
+ echo -e (set_color $color)"[$last_status]"
+end