Record termtosvg on how to add functions to your prompt
jedahan opened this issue · comments
Jonathan Dahan commented
https://github.com/nbedos/termtosvg is awesome because we can embed svgs into the readme without linking out to asciinemas website.
scripts
- geometry is easy to extend
- lets say we want to show the current day in the left hand prompt, like
date -u +"%a"
- first, make a function to do what we want:
day() { date -u +"%a" }
- now add to the left prompt:
GEOMETRY_PROMPT += (day)
- hmm, we want that on the left side:
GEOMETRY_PROMPT=(day $GEOMETRY_PROMPT)
- and lets remove the right hand side one
GEOMETRY_PROMPT[3]=
- Cool!
- if you want to see how functions are made, just check out
functions geometry_path
- this is also a good way of seeing how to customize the shipped functions
- thanks for checking it all out!
Jonathan Dahan commented
recorded, its not great, but its up on mnml branch