aboutsummaryrefslogtreecommitdiffstats
path: root/src/run
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-05-09 18:00:35 +0200
committerJonas Maier <jonas@x77.dev>2026-05-09 18:00:35 +0200
commit8d020342f0c555c7d6f98179b8165fae246c6da6 (patch)
tree10506f3edc06c5f91de241ea5f914f5a4796e19b /src/run
parentcc1bf55b9996d556080c4104e211f24508b29cd8 (diff)
downloadpish-8d020342f0c555c7d6f98179b8165fae246c6da6.tar.gz
more builtin variables
Diffstat (limited to 'src/run')
-rw-r--r--src/run/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs
index bae9567..ddac394 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -465,6 +465,9 @@ impl parse::Expander for Executor {
) -> Result<BString, Self::Error> {
match &var[..] {
b"CWD_PRETTY" => return Ok(crate::pretty_cwd().into_bytes()),
+ b"PISH_VERSION" => return Ok(crate::consts::PISH_VERSION.as_bytes().to_vec()),
+ b"PISH_COMMIT" => return Ok(crate::consts::PISH_COMMIT.as_bytes().to_vec()),
+ b"PISH_DIRTY" => return Ok(vec![crate::consts::PISH_DIRTY as u8 + b'0']),
_ => {}
}