mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
style: readability
This commit is contained in:
parent
c6e928c160
commit
5b663d616a
1 changed files with 13 additions and 9 deletions
|
|
@ -36,22 +36,26 @@ build_message () {
|
||||||
|
|
||||||
while [[ $i -lt $argc ]];
|
while [[ $i -lt $argc ]];
|
||||||
do
|
do
|
||||||
if [[ "${argv[$i]}" =~ (-sa|-as) ]]; then
|
local flag="${argv[$i]}"
|
||||||
|
local value="${argv[$i + 1]}"
|
||||||
|
local next=$[$i + 1]
|
||||||
|
|
||||||
|
if [[ "$flag" =~ (-sa|-as) ]]; then
|
||||||
local attention='!'
|
local attention='!'
|
||||||
local scope="(${argv[$i + 1]})"
|
local scope="($value)"
|
||||||
i=$[$i + 1]
|
i=$next
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${argv[$i]}" =~ (-a|--attention) ]]; then
|
if [[ "$flag" =~ (-a|--attention) ]]; then
|
||||||
local attention='!'
|
local attention='!'
|
||||||
i=$[$i + 1]
|
i=$next
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${argv[$i]}" =~ (-s|--scope) ]]; then
|
if [[ "$flag" =~ (-s|--scope) ]]; then
|
||||||
local scope="(${argv[$i + 1]})"
|
local scope="($value)"
|
||||||
i=$[$i + 1]
|
i=$next
|
||||||
fi
|
fi
|
||||||
i=$[$i + 1]
|
i=$next
|
||||||
done
|
done
|
||||||
|
|
||||||
local template="'$type'${scope}$attention: ${@}";
|
local template="'$type'${scope}$attention: ${@}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue