Skip to content

Instantly share code, notes, and snippets.

@roc
Created January 31, 2021 17:11
Show Gist options
  • Save roc/b3752bcc41e15fb3edec6f0e63beff41 to your computer and use it in GitHub Desktop.
Save roc/b3752bcc41e15fb3edec6f0e63beff41 to your computer and use it in GitHub Desktop.
Echo out the current deno version in a powerlevel9k segment
# 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
@roc
Copy link
Author

roc commented Jan 31, 2021

Screenshot 2021-01-31 at 17 12 36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment