summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Grythe Stødle <jonstodle@outlook.com>2020-02-06 20:41:55 +0100
committerGitHub <noreply@github.com>2020-02-06 14:41:55 -0500
commit2509a791764efaa313a49dc1005796cba067588f (patch)
treea7c21213708f7961644bcc3d34d3f07ee51c9446
parentcead23edcaa7de0b5bcfb22d96f226628c4bbecd (diff)
fix: Change command duration variable for Ion shell to CMD_DURATION (#911)
-rw-r--r--src/init/starship.ion4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init/starship.ion b/src/init/starship.ion
index 5d9ef4f33..0d979df2d 100644
--- a/src/init/starship.ion
+++ b/src/init/starship.ion
@@ -4,7 +4,9 @@ fn PROMPT
let STARSHIP_ION_STATUS = $?
# Save the ION_CMD_DURATION before running any other commands, but after the status since the
# duration is not updated during variable assignment
- let STARSHIP_ION_CMD_DURATION = $ION_CMD_DURATION
+ # Account for variable name change sometime during December 2019 - January 2020
+ let STARSHIP_ION_CMD_DURATION = $or($CMD_DURATION $ION_CMD_DURATION)
+ let STARSHIP_ION_CMD_DURATION = $((STARSHIP_ION_CMD_DURATION * 1000))
# The STARSHIP between the colons will be replaced with the actual path to the starship executable.
# The jobs command outputs to stderr, therefore we need to pipe stderr to `wc -l`.