aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-10-13 09:48:40 -0300
committerEuAndreh <eu@euandre.org>2023-10-13 09:48:40 -0300
commit7b831ef9ae72a6685fa11e135a19614ec2164641 (patch)
treec3bc3865227e522fdd5fc4feda58ea067e1e4757
parentetc/sh/rc: Add C-n and C-p mappings for vi (diff)
downloaddotfiles-7b831ef9ae72a6685fa11e135a19614ec2164641.tar.gz
dotfiles-7b831ef9ae72a6685fa11e135a19614ec2164641.tar.xz
etc/sh/rc: Add `makeflags_status` to $PS1
-rw-r--r--etc/sh/rc8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index 01ed162..e441775 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -297,13 +297,19 @@ direnv_status() {
fi
}
+makeflags_status() {
+ if [ -n "${MAKEFLAGS:-}" ]; then
+ color -c lightblue '|'
+ fi
+}
+
vcs_status() {
timeout 0.5 vcs ps1 || if [ $? = 124 ]; then
color -c red '❌'
fi
}
-PS1='`error_marker`'$(timestamp)' '$(path)'`direnv_status` `shell_status``vcs_status``guix_env``in_nix_shell`
+PS1='`error_marker`'$(timestamp)' '$(path)'`direnv_status``makeflags_status` `shell_status``vcs_status``guix_env``in_nix_shell`
'$(in_ssh_session)'$ '