From f86e7efebd9c6a3cd01d9ceea57290715b6c7a9c Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Thu, 15 Aug 2019 23:39:12 -0400 Subject: [PATCH] prompt: add return status indicator --- scripts/fish/prompt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/fish/prompt b/scripts/fish/prompt index 5011e7a..dbbd97a 100644 --- a/scripts/fish/prompt +++ b/scripts/fish/prompt @@ -1,8 +1,14 @@ # vim: syntax=fish: function fish_prompt + set _stat $status echo -n (set_color 70a9ff)(date +%H:%M:%S) - echo -n (set_color normal)@ + echo -n (set_color normal)( + if test $_stat -eq 0 + echo '@' + else + echo '!' + end) echo -n (set_color c792ea)$hostname echo (set_color normal)"% " end