Skip to content

Set LANG=en in parse_git_dirty#11

Open
hennes-maertins wants to merge 1 commit intojmatth:masterfrom
hennes-maertins:master
Open

Set LANG=en in parse_git_dirty#11
hennes-maertins wants to merge 1 commit intojmatth:masterfrom
hennes-maertins:master

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