Created
January 31, 2021 17:11
-
-
Save roc/b3752bcc41e15fb3edec6f0e63beff41 to your computer and use it in GitHub Desktop.
Echo out the current deno version in a powerlevel9k segment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print the current version of deno in prompt | |
function prompt_my_deno_version() { | |
local vers=`deno -V` | |
p10k segment -b '#0F467A' -f 'white' -i '🦕' -t ${vers//"deno "/""} | |
} | |
# ... | |
# Customise the Powerlevel9k prompts | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( | |
dir | |
node_version | |
my_deno_version | |
) | |
# ... | |
# comes out like --> 🦕 1.7.1 |
Author
roc
commented
Jan 31, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment