Displaying the percent sign (%) at the end of the right prompt #153
Answered
by
reobin
bound-variable
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
reobin
Nov 4, 2022
Replies: 1 comment 1 reply
-
Hey @Pound-Hash ! That is actually a great use of the prefix function! Try doubling your percentage sign: battery() {
local capacity=$(cat /sys/class/power_supply/BAT0/capacity)
echo "${capacity}%%"
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
reobin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Pound-Hash !
That is actually a great use of the prefix function!
Try doubling your percentage sign: