When I run git-sh from my terminal it works fine. But I get the following warning.
bash: export: `--wait': not a valid identifier
What is this and how do I get rid of it?
Somewhere in that script is a line like
and the value of the variable
SOMETHING contains a space followed by
$SOMETHING may be
foo --wait or
foo --wait=42. The bash builtin
export thus receives two arguments,
VAR=foo (a perfectly valid assignment) and
--wait, which is not a valid variable name.
The fix is to use double quotes. Always use double quotes around variable substitutions. Either of these will do:
export VAR="$SOMETHING" export "VAR=$SOMETHING"
To find which line is affected, run
bash -x ./git-sh instead of
set -x; . git-sh; set +x instead of
. git-sh. The shell will print a trace of the lines it executes; look for the error in the trace.