X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2Fgit-commit-tree.bashrc;h=95a4eaf41870e3fa5e6706d14e79f1dbdc52d468;hb=bca401ff28ad02d3dad0343541b1b7eefdea6eb5;hp=37ec8ebeddbc8eb3267efe813d678ba3a0da1578;hpb=052275b71b2580e040fd4b1f97dfe7fd3d58ec0b;p=profile.git diff --git a/.profile.d/git-commit-tree.bashrc b/.profile.d/git-commit-tree.bashrc index 37ec8eb..95a4eaf 100644 --- a/.profile.d/git-commit-tree.bashrc +++ b/.profile.d/git-commit-tree.bashrc @@ -1,11 +1,11 @@ # Set GIT_AUTHOR_NAME etc from dotfiles in the profile. function git_commit_tree() { local WHO=$1; shift - local who=${WHO,,} + local who="$(echo $WHO | tr '[[:upper:]]' '[[:lower:]]')" local WHAT= for WHAT in EMAIL NAME; do - local what=${WHAT,,} + local what="$(echo $WHAT | tr '[[:upper:]]' '[[:lower:]]')" local where= # Look in $HOME then $PROFILE_HOME. @@ -20,7 +20,7 @@ function git_commit_tree() { # Fall back to generic file. if [ -z "$value" ]; then - eval value=\$\(\<\$${where}/".git_${what}"\) 2>/dev/null + eval value=\$\(\<${where}/".git_${what}"\) 2>/dev/null fi fi