Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set LANG=en in parse_git_dirty #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hennes-maertins
Copy link

The function parse_git_dirty needs the output of git status to be in
english. This means to lose information in the git status of your prompt if
git speaks to you in a different language.

For example a git status output could be the following in german:

Auf Branch master
Ihr Branch ist auf dem selben Stand wie 'origin/master'.
zum Commit vorgemerkte Änderungen:
  (benutzen Sie "git reset HEAD <Datei>..." zum Entfernen aus der Staging-Area)

geändert:       js/easyprompt.js

To force git to speak english you can set LANG=en in the function
parse_git_dirty before git status is called. This modification of LANG
is just local. The user will still get the output in his language when he calls
git status by himself.

The function `parse_git_dirty` needs the output of `git status` to be in
english. This means to lose information in the git status of your prompt if
git speaks to you in a different language.

For example a `git status` output could be the following in german:

    Auf Branch master
    Ihr Branch ist auf dem selben Stand wie 'origin/master'.
    zum Commit vorgemerkte Änderungen:
      (benutzen Sie "git reset HEAD <Datei>..." zum Entfernen aus der Staging-Area)

    geändert:       js/easyprompt.js

To force git to speak english you can set `LANG=en` in the function
`parse_git_dirty` before `git status` is called. This modification of `LANG`
is just local. The user will still get the output in his language when he calls
`git status` by himself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant