ZSH Prompt printing '[m' instead of '%'
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I added a battery function to my vim statusline here's a link. It displays my battery correctly in vim and if I run $ acpi | grep -oP "(d+)%"
it returns some number followed by the percent sign (as expected). I decided to update my zshrc
since it prints better than the cut
I was using:
bat () acpi
PROMPT="%t | %(bat) | %d
$ "
However, what I end up with is:
7:22PM | 89[m | /home/rain
$
How do I get the [m
to print as a %
? Or can I drop it altogether and just have the digit print?
zsh prompt
add a comment |Â
up vote
0
down vote
favorite
I added a battery function to my vim statusline here's a link. It displays my battery correctly in vim and if I run $ acpi | grep -oP "(d+)%"
it returns some number followed by the percent sign (as expected). I decided to update my zshrc
since it prints better than the cut
I was using:
bat () acpi
PROMPT="%t | %(bat) | %d
$ "
However, what I end up with is:
7:22PM | 89[m | /home/rain
$
How do I get the [m
to print as a %
? Or can I drop it altogether and just have the digit print?
zsh prompt
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I added a battery function to my vim statusline here's a link. It displays my battery correctly in vim and if I run $ acpi | grep -oP "(d+)%"
it returns some number followed by the percent sign (as expected). I decided to update my zshrc
since it prints better than the cut
I was using:
bat () acpi
PROMPT="%t | %(bat) | %d
$ "
However, what I end up with is:
7:22PM | 89[m | /home/rain
$
How do I get the [m
to print as a %
? Or can I drop it altogether and just have the digit print?
zsh prompt
I added a battery function to my vim statusline here's a link. It displays my battery correctly in vim and if I run $ acpi | grep -oP "(d+)%"
it returns some number followed by the percent sign (as expected). I decided to update my zshrc
since it prints better than the cut
I was using:
bat () acpi
PROMPT="%t | %(bat) | %d
$ "
However, what I end up with is:
7:22PM | 89[m | /home/rain
$
How do I get the [m
to print as a %
? Or can I drop it altogether and just have the digit print?
zsh prompt
zsh prompt
asked 4 mins ago
345422
967
967
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476151%2fzsh-prompt-printing-m-instead-of%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password