SCM_CURRENT_USER supports accented characters

`tr 'A-Z' 'a-z'` will only convert non-accented characters. Switching to
`[:upper:]` and `[:lower:]` adds support for accents.
See https://github.com/koalaman/shellcheck/wiki/SC2018

Additionally, printf's character splitting does not support accented
characters, so output isn't as expected. Using bash's variable expansion
syntax instead will correctly get the full accented character.
This commit is contained in:
Dan Wendorf
2017-08-06 12:55:46 -07:00
parent 150e82b221
commit c5f2c408e7
2 changed files with 6 additions and 1 deletions

View File

@@ -362,6 +362,11 @@ setup_repo_with_upstream() {
git_prompt_vars
assert_equal "$SCM_BRANCH" "${pre} ☺︎ cu"
git config user.name "Çool Üser"
git_prompt_vars
assert_equal "$SCM_BRANCH" "${pre} ☺︎ çü"
# show initials set by `git pair`
git config user.initials "ab cd"