mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
fix: variable scope & unset variable
This commit is contained in:
parent
6fa29f7a2b
commit
2aea350b0a
1 changed files with 2 additions and 3 deletions
|
|
@ -14,7 +14,6 @@ _git_commit_aliases=(
|
||||||
'wip'
|
'wip'
|
||||||
)
|
)
|
||||||
|
|
||||||
local -a _git_commit_flags
|
|
||||||
_git_commit_flags=(
|
_git_commit_flags=(
|
||||||
'-s'
|
'-s'
|
||||||
'--scope'
|
'--scope'
|
||||||
|
|
@ -33,7 +32,7 @@ remove_flags() {
|
||||||
message=$(sed -E "s/\s($regex)\s|\s($regex)$//g" <<< "$message")
|
message=$(sed -E "s/\s($regex)\s|\s($regex)$//g" <<< "$message")
|
||||||
|
|
||||||
echo "$message"
|
echo "$message"
|
||||||
}
|
};
|
||||||
|
|
||||||
build_message () {
|
build_message () {
|
||||||
if [[ "$*" =~ (-sa|-as) ]]; then
|
if [[ "$*" =~ (-sa|-as) ]]; then
|
||||||
|
|
@ -77,4 +76,4 @@ for type in "${_git_commit_aliases[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
unset _git_commit_aliases _flags alias type
|
unset _git_commit_aliases _git_commit_flags alias type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue