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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user