Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

adding battery extension to the prompt returns error #1092

@Soneji

Description

@Soneji

Describe Your Issue

What is happening?
Battery extension not working in prompt.

Most issues are best explained with a screenshot. Please share one if you can!

Have you tried to debug or fix it?

zsh returns this on every line prompt_battery:27: bad math expression: illegal character: ^[

reading the powerlevel9k.zsh-theme and prompt_powerlevel9k_setup file i see that it is this line causing the issue: bat_percent=$(echo $raw_data | grep -o '[0-9]*%' | sed 's/%//')

Environment Information

This information will help us understand your configuration.

  • What version of ZSH are you using? You can use zsh --version to see this.
    zsh 5.6.2 (x86_64-apple-darwin18.0.0)
  • Do you use a ZSH framework (e.g., Oh-My-ZSH, Antigen)?
    Oh-My-ZSH
  • How did you install P9k (cloning the repo, by tarball, a package from your OS, etc.,)?
    Clone from github to ~/.oh-my-zsh/custom/themes/powerlevel9k
  • What version of P9k are you using?
    Latest? Just cloned it today
  • Which terminal emulator do you use?
    Standard macOS one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions