1
0
Fork 0
mirror of https://github.com/zdharma-continuum/fast-syntax-highlighting.git synced 2025-02-23 00:29:29 +01:00

:chroma/* → →chroma/*

This commit is contained in:
Sebastian Gniazdowski 2020-04-14 20:06:04 +02:00
parent c4c419edb9
commit a3242a9339
35 changed files with 357 additions and 357 deletions

View file

@ -165,105 +165,105 @@ typeset -gA FAST_HIGHLIGHT
: ${FAST_HIGHLIGHT[use_brackets]:=1}
FAST_HIGHLIGHT+=(
chroma-fast-theme :chroma/-fast-theme.ch
chroma-alias :chroma/-alias.ch
chroma-autoload :chroma/-autoload.ch
chroma-autorandr :chroma/-autorandr.ch
chroma-docker :chroma/-docker.ch
chroma-example :chroma/-example.ch
chroma-ionice :chroma/-ionice.ch
chroma-make :chroma/-make.ch
chroma-nice :chroma/-nice.ch
chroma-nmcli :chroma/-nmcli.ch
chroma-node :chroma/-node.ch
chroma-perl :chroma/-perl.ch
chroma-printf :chroma/-printf.ch
chroma-ruby :chroma/-ruby.ch
chroma-scp :chroma/-scp.ch
chroma-ssh :chroma/-ssh.ch
chroma-fast-theme chroma/-fast-theme.ch
chroma-alias chroma/-alias.ch
chroma-autoload chroma/-autoload.ch
chroma-autorandr chroma/-autorandr.ch
chroma-docker chroma/-docker.ch
chroma-example chroma/-example.ch
chroma-ionice chroma/-ionice.ch
chroma-make chroma/-make.ch
chroma-nice chroma/-nice.ch
chroma-nmcli chroma/-nmcli.ch
chroma-node chroma/-node.ch
chroma-perl chroma/-perl.ch
chroma-printf chroma/-printf.ch
chroma-ruby chroma/-ruby.ch
chroma-scp chroma/-scp.ch
chroma-ssh chroma/-ssh.ch
chroma-git :chroma/main-chroma.ch%git
chroma-hub :chroma/-hub.ch
chroma-lab :chroma/-lab.ch
chroma-svn :chroma/-subversion.ch
chroma-svnadmin :chroma/-subversion.ch
chroma-svndumpfilter :chroma/-subversion.ch
chroma-git chroma/main-chroma.ch%git
chroma-hub chroma/-hub.ch
chroma-lab chroma/-lab.ch
chroma-svn chroma/-subversion.ch
chroma-svnadmin chroma/-subversion.ch
chroma-svndumpfilter chroma/-subversion.ch
chroma-egrep :chroma/-grep.ch
chroma-fgrep :chroma/-grep.ch
chroma-grep :chroma/-grep.ch
chroma-egrep chroma/-grep.ch
chroma-fgrep chroma/-grep.ch
chroma-grep chroma/-grep.ch
chroma-awk :chroma/-awk.ch
chroma-gawk :chroma/-awk.ch
chroma-mawk :chroma/-awk.ch
chroma-awk chroma/-awk.ch
chroma-gawk chroma/-awk.ch
chroma-mawk chroma/-awk.ch
chroma-source :chroma/-source.ch
chroma-. :chroma/-source.ch
chroma-source chroma/-source.ch
chroma-. chroma/-source.ch
chroma-bash :chroma/-sh.ch
chroma-fish :chroma/-sh.ch
chroma-sh :chroma/-sh.ch
chroma-zsh :chroma/-sh.ch
chroma-bash chroma/-sh.ch
chroma-fish chroma/-sh.ch
chroma-sh chroma/-sh.ch
chroma-zsh chroma/-sh.ch
chroma-whatis :chroma/-whatis.ch
chroma-man :chroma/-whatis.ch
chroma-whatis chroma/-whatis.ch
chroma-man chroma/-whatis.ch
chroma-- :chroma/-precommand.ch
chroma-xargs :chroma/-precommand.ch
chroma-nohup :chroma/-precommand.ch
chroma-- chroma/-precommand.ch
chroma-xargs chroma/-precommand.ch
chroma-nohup chroma/-precommand.ch
chroma-hg :chroma/-subcommand.ch
chroma-cvs :chroma/-subcommand.ch
chroma-pip :chroma/-subcommand.ch
chroma-pip2 :chroma/-subcommand.ch
chroma-pip3 :chroma/-subcommand.ch
chroma-gem :chroma/-subcommand.ch
chroma-bundle :chroma/-subcommand.ch
chroma-yard :chroma/-subcommand.ch
chroma-cabal :chroma/-subcommand.ch
chroma-npm :chroma/-subcommand.ch
chroma-nvm :chroma/-subcommand.ch
chroma-yarn :chroma/-subcommand.ch
chroma-brew :chroma/-subcommand.ch
chroma-port :chroma/-subcommand.ch
chroma-yum :chroma/-subcommand.ch
chroma-dnf :chroma/-subcommand.ch
chroma-tmux :chroma/-subcommand.ch
chroma-pass :chroma/-subcommand.ch
chroma-aws :chroma/-subcommand.ch
chroma-apt :chroma/-subcommand.ch
chroma-apt-get :chroma/-subcommand.ch
chroma-apt-cache :chroma/-subcommand.ch
chroma-aptitude :chroma/-subcommand.ch
chroma-keyctl :chroma/-subcommand.ch
chroma-systemctl :chroma/-subcommand.ch
chroma-asciinema :chroma/-subcommand.ch
chroma-ipfs :chroma/-subcommand.ch
chroma-zinit :chroma/main-chroma.ch%zinit
chroma-aspell :chroma/-subcommand.ch
chroma-bspc :chroma/-subcommand.ch
chroma-cryptsetup :chroma/-subcommand.ch
chroma-diskutil :chroma/-subcommand.ch
chroma-exercism :chroma/-subcommand.ch
chroma-gulp :chroma/-subcommand.ch
chroma-i3-msg :chroma/-subcommand.ch
chroma-openssl :chroma/-subcommand.ch
chroma-solargraph :chroma/-subcommand.ch
chroma-subliminal :chroma/-subcommand.ch
chroma-svnadmin :chroma/-subcommand.ch
chroma-travis :chroma/-subcommand.ch
chroma-udisksctl :chroma/-subcommand.ch
chroma-xdotool :chroma/-subcommand.ch
chroma-zmanage :chroma/-subcommand.ch
chroma-zsystem :chroma/-subcommand.ch
chroma-zypper :chroma/-subcommand.ch
chroma-hg chroma/-subcommand.ch
chroma-cvs chroma/-subcommand.ch
chroma-pip chroma/-subcommand.ch
chroma-pip2 chroma/-subcommand.ch
chroma-pip3 chroma/-subcommand.ch
chroma-gem chroma/-subcommand.ch
chroma-bundle chroma/-subcommand.ch
chroma-yard chroma/-subcommand.ch
chroma-cabal chroma/-subcommand.ch
chroma-npm chroma/-subcommand.ch
chroma-nvm chroma/-subcommand.ch
chroma-yarn chroma/-subcommand.ch
chroma-brew chroma/-subcommand.ch
chroma-port chroma/-subcommand.ch
chroma-yum chroma/-subcommand.ch
chroma-dnf chroma/-subcommand.ch
chroma-tmux chroma/-subcommand.ch
chroma-pass chroma/-subcommand.ch
chroma-aws chroma/-subcommand.ch
chroma-apt chroma/-subcommand.ch
chroma-apt-get chroma/-subcommand.ch
chroma-apt-cache chroma/-subcommand.ch
chroma-aptitude chroma/-subcommand.ch
chroma-keyctl chroma/-subcommand.ch
chroma-systemctl chroma/-subcommand.ch
chroma-asciinema chroma/-subcommand.ch
chroma-ipfs chroma/-subcommand.ch
chroma-zinit chroma/main-chroma.ch%zinit
chroma-aspell chroma/-subcommand.ch
chroma-bspc chroma/-subcommand.ch
chroma-cryptsetup chroma/-subcommand.ch
chroma-diskutil chroma/-subcommand.ch
chroma-exercism chroma/-subcommand.ch
chroma-gulp chroma/-subcommand.ch
chroma-i3-msg chroma/-subcommand.ch
chroma-openssl chroma/-subcommand.ch
chroma-solargraph chroma/-subcommand.ch
chroma-subliminal chroma/-subcommand.ch
chroma-svnadmin chroma/-subcommand.ch
chroma-travis chroma/-subcommand.ch
chroma-udisksctl chroma/-subcommand.ch
chroma-xdotool chroma/-subcommand.ch
chroma-zmanage chroma/-subcommand.ch
chroma-zsystem chroma/-subcommand.ch
chroma-zypper chroma/-subcommand.ch
chroma-fpath+=\( :chroma/-fpath_peq.ch
chroma-fpath=\( :chroma/-fpath_peq.ch
chroma-FPATH+= :chroma/-fpath_peq.ch
chroma-FPATH= :chroma/-fpath_peq.ch
#chroma-which :chroma/-which.ch
#chroma-vim :chroma/-vim.ch
chroma-fpath+=\( chroma/-fpath_peq.ch
chroma-fpath=\( chroma/-fpath_peq.ch
chroma-FPATH+= chroma/-fpath_peq.ch
chroma-FPATH= chroma/-fpath_peq.ch
#chroma-which chroma/-which.ch
#chroma-vim chroma/-vim.ch
)
# Assignments seen, to know if math parameter exists

View file

@ -323,15 +323,15 @@ zmodload zsh/system 2>/dev/null
autoload -Uz -- is-at-least fast-theme .fast-read-ini-file .fast-run-git-command \
.fast-make-targets .fast-run-command .fast-zts-read-all
autoload -Uz -- :chroma/-git.ch :chroma/-hub.ch :chroma/-lab.ch :chroma/-example.ch \
:chroma/-grep.ch :chroma/-perl.ch :chroma/-make.ch :chroma/-awk.ch \
:chroma/-vim.ch :chroma/-source.ch :chroma/-sh.ch :chroma/-docker.ch \
:chroma/-autoload.ch :chroma/-ssh.ch :chroma/-scp.ch :chroma/-which.ch \
:chroma/-printf.ch :chroma/-ruby.ch :chroma/-whatis.ch :chroma/-alias.ch \
:chroma/-subcommand.ch :chroma/-autorandr.ch :chroma/-nmcli.ch \
:chroma/-fast-theme.ch :chroma/-node.ch :chroma/-fpath_peq.ch \
:chroma/-precommand.ch :chroma/-subversion.ch :chroma/-ionice.ch \
:chroma/-nice.ch :chroma/main-chroma.ch :chroma/-ogit.ch :chroma/-zinit.ch
autoload -Uz -- →chroma/-git.ch →chroma/-hub.ch →chroma/-lab.ch →chroma/-example.ch \
→chroma/-grep.ch →chroma/-perl.ch →chroma/-make.ch →chroma/-awk.ch \
→chroma/-vim.ch →chroma/-source.ch →chroma/-sh.ch →chroma/-docker.ch \
→chroma/-autoload.ch →chroma/-ssh.ch →chroma/-scp.ch →chroma/-which.ch \
→chroma/-printf.ch →chroma/-ruby.ch →chroma/-whatis.ch →chroma/-alias.ch \
→chroma/-subcommand.ch →chroma/-autorandr.ch →chroma/-nmcli.ch \
→chroma/-fast-theme.ch →chroma/-node.ch →chroma/-fpath_peq.ch \
→chroma/-precommand.ch →chroma/-subversion.ch →chroma/-ionice.ch \
→chroma/-nice.ch →chroma/main-chroma.ch →chroma/-ogit.ch →chroma/-zinit.ch
source "${0:h}/fast-highlight"
source "${0:h}/fast-string-highlight"

View file

@ -17,20 +17,20 @@ fsh__git__chroma__def=(
subcmd:NULL "NULL_0_opt"
NULL_0_opt "(-C|--exec-path=|--git-dir=|--work-tree=|--namespace=|--super-prefix=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| -c
<<>> __style=\${FAST_THEME_NAME}single-hyphen-option // NO-OP
<<>> __style=\${FAST_THEME_NAME}optarg-string // NO-OP
|| (--version|--help|--html-path|--man-path|--info-path|-p|--paginate|
-P|--no-pager|--no-replace-objects|--bare)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
"subcommands" ":::chroma/-git-get-subcommands" # run a function (the :: causes this) and use `reply'
"subcommands" "::chroma/-git-get-subcommands" # run a function (the :: causes this) and use `reply'
#"subcommands" "(fetch|pull)" # run a function (the :: causes this) and use `reply'
"subcmd-hook" ":chroma/-git-check-if-alias"
"subcmd-hook" "chroma/-git-check-if-alias"
"subcommands-blacklist" "mv,other"
@ -70,8 +70,8 @@ fsh__git__chroma__def=(
--refmap=|--recurse-submodules=|-j|--jobs=|--submodule-prefix=|
--recurse-submodules-default=|-o|--server-option=|--upload-pack|
--negotiation-tip=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--help|--all|-a|--append|--unshallow|--update-shallow|--dry-run|-f|--force|
-k|--keep|--multiple|-p|--prune|-n|--no-tags|-t|--tags|--no-recurse-submodules|
-u|--update-head-ok|-q|--quiet|-v|--verbose|--progress|
@ -84,9 +84,9 @@ fsh__git__chroma__def=(
# is set to be argument-less. The argument is a) -o/--option argument
# and b) -o/--option=argument.
REMOTE_GR_1_arg "NO-OP // :::chroma/-git-verify-remote-or-group" # This definition is generic, reused later
"REF_#_arg" "NO-OP // :::chroma/-git-verify-ref" # This too
"REMOTE_GR_#_arg" "NO-OP // :::chroma/-git-verify-remote-or-group" # and this too
REMOTE_GR_1_arg "NO-OP // ::chroma/-git-verify-remote-or-group" # This definition is generic, reused later
"REF_#_arg" "NO-OP // ::chroma/-git-verify-ref" # This too
"REMOTE_GR_#_arg" "NO-OP // ::chroma/-git-verify-remote-or-group" # and this too
# The hash `#' above denotes: an argument at any position
# It will nicely match any following (above the first explicitly
# numbered ones) arguments passed when using --multiple
@ -107,8 +107,8 @@ fsh__git__chroma__def=(
PUSH_0_opt "
(--receive-pack=|--exec=|--repo=|--push-option=|--signed=|
--force-with-lease=|--signed=|--recurse-submodules=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--help|--all|--mirror|--tags|--follow-tags|--atomic|-n|--dry-run|
--porcelain|--delete|--tags|--follow-tags|--signed|--no-signed|
--atomic|--no-atomic|-o|--push-option|--force-with-lease|
@ -117,7 +117,7 @@ fsh__git__chroma__def=(
--verify|--no-verify|-4|--ipv4|-6|--ipv6)
<<>> __style=\${FAST_THEME_NAME}single-hyphen-option // NO-OP"
REMOTE_1_arg "NO-OP // :::chroma/-git-verify-remote" # This definition is generic, reused later
REMOTE_1_arg "NO-OP // ::chroma/-git-verify-remote" # This definition is generic, reused later
### }}}
@ -133,8 +133,8 @@ fsh__git__chroma__def=(
--strategy-option=|--rebase=|--depth=|--deepen=|--shallow-exclude=|
--shallow-since=|--negotiation-tip|--upload-pack|-o|--server-option=|
--no-recurse-submodules=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--help|-q|--quiet|-v|--verbose|--progress|--no-recurse-submodules|
--commit|--no-commit|--edit|--no-edit|--ff|--no-ff|--ff-only|
--log|--no-log|--signoff|--no-signoff|--stat|-n|--no-stat|--squash|
@ -156,22 +156,22 @@ fsh__git__chroma__def=(
"COMMIT_#_opt" "
(-m|--message=|-am)
<<>> NO-OP // :::chroma/-git-commit-msg-opt-action
<<>> NO-OP // :::chroma/-git-commit-msg-opt-ARG-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-ARG-action
|| (--help|-a|--all|-p|--patch|--reset-author|--short|--branch|
--porcelain|--long|-z|--null|-s|--signoff|-n|--no-verify|
--allow-empty|--allow-empty-message|-e|--edit|--no-edit|
--amend|--no-post-rewrite|-i|--include|-o|--only|--untracked-files|
-v|--verbose|-q|--quiet|--dry-run|--status|--no-status|--no-gpg-sign)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (-C|--reuse-message=|-c|--reedit-message=|--fixup=|--squash=|
-F|--file=|--author=|--date=|-t|--template=|--cleanup=|
-u|--untracked-files=|-S|--gpg-sign=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action"
# A generic action
"FILE_#_arg" "NO-OP // :::chroma/-git-verify-file"
"FILE_#_arg" "NO-OP // ::chroma/-git-verify-file"
## }}}
@ -183,20 +183,20 @@ fsh__git__chroma__def=(
subcmd:merge "MERGE_0_opt // COMMIT_#_arg"
MERGE_0_opt
"(-m)
<<>> NO-OP // :::chroma/-git-commit-msg-opt-action
<<>> NO-OP // :::chroma/-git-commit-msg-opt-ARG-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-ARG-action
(-S|--gpg-sign=|--log=|-e|--strategy=|-X|--strategy-option=|-F|
--file)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--help|--commit|--no-commit|-e|--edit|--no-edit|--ff|--no-ff|--ff-only|
--log|--no-log|--signoff|--no-signoff|-n|--stat|--no-stat|--squash|
--no-squash|--verify-signatures|--no-verify-signatures|--summary|
--no-summary|-q|--quiet|-v|--verbose|--progress|--no-progress|
--allow-unrelated-histories|--rerere-autoupdate|--no-rerere-autoupdate|
--abort|--continue)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
COMMIT_\#_arg "NO-OP // :::chroma/-git-verify-commit"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
COMMIT_\#_arg "NO-OP // ::chroma/-git-verify-commit"
## }}}
@ -208,7 +208,7 @@ fsh__git__chroma__def=(
subcmd:reset "RESET_0_opt^ // RESET_0_opt // RESET_#_arg // NO_MATCH_#_opt"
"RESET_0_opt^" "
(--soft|--mixed|--hard|--merge|--keep)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (--soft|--mixed|--hard|--merge|--keep):del
<<>> RESET_0_opt // RESET_#_arg
|| (--soft|--mixed|--hard|--merge|--keep):add
@ -217,11 +217,11 @@ fsh__git__chroma__def=(
RESET_0_opt "
(-q|-p|--patch)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
RESET_1_arg "NO-OP // :::chroma/-git-verify-commit"
RESET_1_arg "NO-OP // ::chroma/-git-verify-commit"
"RESET_#_arg" "NO-OP // :::chroma/-git-RESET-verify-commit-or-file"
"RESET_#_arg" "NO-OP // ::chroma/-git-RESET-verify-commit-or-file"
## }}}
@ -234,20 +234,20 @@ fsh__git__chroma__def=(
subcmd:revert "REVERT_SEQUENCER_0_opt^ // REVERT_0_opt // REVERT_#_arg // NO_MATCH_#_opt"
REVERT_0_opt "
(-m|--mainline|-S|--gpg-sign=|--strategy=|-X|--strategy-option=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (-e|--edit|--no-edit|-n|--no-commit|-s|--signoff)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
"REVERT_SEQUENCER_0_opt^" "
(--continue|--quit|--abort)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (--continue|--quit|--abort):del
<<>> REVERT_0_opt // REVERT_#_arg
|| (--continue|--quit|--abort):add
<<>> NO_MATCH_#_arg"
"REVERT_#_arg" "NO-OP // :::chroma/-git-verify-commit"
"REVERT_#_arg" "NO-OP // ::chroma/-git-verify-commit"
## }}}
@ -262,7 +262,7 @@ fsh__git__chroma__def=(
"DIFF_NO_INDEX_0_opt^" "
--no-index
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| --no-index:del
<<>> COMMIT_FILE_DIR_#_arg
|| --no-index:add
@ -275,8 +275,8 @@ fsh__git__chroma__def=(
--diff-filter=|-S|-G|--find-object=|--relative=|-O|--relative=|
--inter-hunk-context=|--ignore-submodules=|--src-prefix=|--dst-prefix=|
--line-prefix=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (-p|--patch|-u|-s|--no-patch|--raw|--patch-with-raw|--indent-heuristic|
--no-indent-heuristic|--minimal|--patience|--histogram|--stat|
--compact-summary|--numstat|--shortstat|--dirstat|--summary|
@ -290,16 +290,16 @@ fsh__git__chroma__def=(
--ext-diff|--no-ext-diff|--textconv|--no-textconv|--ignore-submodules|
--no-prefix|--ita-invisible-in-index|-1|--base|-2|--ours|-3|--theirs|
-0|--cached)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
# A generic action
"COMMIT_FILE_DIR_#_arg" "NO-OP // :::chroma/-git-verify-commit-or-file-or-dir"
"COMMIT_FILE_DIR_#_arg" "NO-OP // ::chroma/-git-verify-commit-or-file-or-dir"
# A generic action
"FILE_1_arg" "NO-OP // :::chroma/-git-verify-file"
"FILE_1_arg" "NO-OP // ::chroma/-git-verify-file"
# A generic action
"FILE_2_arg" "NO-OP // :::chroma/-git-verify-file"
"FILE_2_arg" "NO-OP // ::chroma/-git-verify-file"
## }}}
@ -312,16 +312,16 @@ fsh__git__chroma__def=(
ADD_0_opt "
--chmod=
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (-v|--verbose|-f|--force|-i|--interactive|-n|--dry-run|
-p|--patch|-e|--edit|--all|--no-all|-A|--all|--no-all|
--ignore-removal|--no-ignore-removal|-u|--update|-N|
--intent-to-add|--refresh|--ignore-errors|--ignore-missing|
--renormalize|--no-warn-embedded-repo)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
FILE_OR_DIR_#_arg "NO-OP // :::chroma/-git-verify-file-or-dir"
FILE_OR_DIR_#_arg "NO-OP // ::chroma/-git-verify-file-or-dir"
## }}}
@ -336,32 +336,32 @@ fsh__git__chroma__def=(
"CHECKOUT_BRANCH_0_opt^" "
(-b|-B|--orphan)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (-b|-B|--orphan):del
<<>> FILE_OR_DIR_OR_BRANCH_OR_COMMIT_1_arg // FILE_#_arg // FILE_#_arg
|| (-b|-B|--orphan):add
<<>> NEW_BRANCH_1_arg // COMMIT_2_arg // NO_MATCH_#_arg"
NEW_BRANCH_1_arg "NO-OP // :::chroma/-git-verify-correct-branch-name"
NEW_BRANCH_1_arg "NO-OP // ::chroma/-git-verify-correct-branch-name"
COMMIT_2_arg "NO-OP // :::chroma/-git-verify-commit"
COMMIT_2_arg "NO-OP // ::chroma/-git-verify-commit"
CHECKOUT_0_opt "
--conflict=
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (-q|--quiet|--progress|--no-progress|-f|--force|--ours|--theirs|
-b|-B|-t|--track|--no-track|-l|--detach|--orphan|
--ignore-skip-worktree-bits|-m|--merge|-p|--patch|
--ignore-other-worktrees|--no-ignore-other-worktrees)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
# A generic action
COMMIT_1_arg "NO-OP // :::chroma/-git-verify-commit"
COMMIT_1_arg "NO-OP // ::chroma/-git-verify-commit"
# Unused
FILE_OR_BRANCH_OR_COMMIT_1_arg "NO-OP // :::chroma/-git-file-or-ubranch-or-commit-verify"
FILE_OR_DIR_OR_BRANCH_OR_COMMIT_1_arg "NO-OP // :::chroma/-git-file-or-dir-or-ubranch-or-commit-verify"
FILE_OR_BRANCH_OR_COMMIT_1_arg "NO-OP // ::chroma/-git-file-or-ubranch-or-commit-verify"
FILE_OR_DIR_OR_BRANCH_OR_COMMIT_1_arg "NO-OP // ::chroma/-git-file-or-dir-or-ubranch-or-commit-verify"
## }}}
@ -376,7 +376,7 @@ fsh__git__chroma__def=(
REMOTE_PRUNE_1_arg // REMOTE_UPDATE_1_arg"
REMOTE_0_opt "(-v|--verbose)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_ADD_1_arg "add ::::: __style=${FAST_THEME_NAME}subcommand // NO-OP <<>>
add:REMOTE_ADD_OPTS_1_opt // REMOTE_A_NAME_2_arg //
@ -417,53 +417,53 @@ fsh__git__chroma__def=(
REMOTE_ADD_OPTS_1_opt "
(-t|-m|--mirror=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (-f|--tags|--no-tags)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_SET_HEAD_OPTS_1_opt "
(-a|--auto|-d|--delete)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_SET_HEAD_OPTS_2_opt "
(-a|--auto|-d|--delete)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_SET_BRANCHES_OPTS_1_opt "
--add
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_GET_URL_OPTS_1_opt "
(--push|--all)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
"REMOTE_SET_URL_OPTS_1_opt^" "
--push|--add|--delete
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (--add|--delete):del
<<>> REMOTE_A_URL_4_arg"
REMOTE_SHOW_OPTS_1_opt "
-n
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_PRUNE_OPTS_1_opt "
(-n|--dry-run)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_UPDATE_OPTS_1_opt "
(-p|--prune)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
REMOTE_A_NAME_2_arg "NO-OP // :::chroma/-git-verify-correct-branch-name"
REMOTE_A_NAME_3_arg "NO-OP // :::chroma/-git-verify-correct-branch-name"
REMOTE_A_URL_3_arg "NO-OP // :::chroma/main-chroma-std-verify-url"
REMOTE_A_URL_4_arg "NO-OP // :::chroma/main-chroma-std-verify-url"
BRANCH_3_arg "NO-OP // :::chroma/-git-verify-branch"
BRANCH_\#_arg "NO-OP // :::chroma/-git-verify-branch"
REMOTE_2_arg "NO-OP // :::chroma/-git-verify-remote"
REMOTE_\#_arg "NO-OP // :::chroma/-git-verify-remote"
REMOTE_A_NAME_2_arg "NO-OP // ::chroma/-git-verify-correct-branch-name"
REMOTE_A_NAME_3_arg "NO-OP // ::chroma/-git-verify-correct-branch-name"
REMOTE_A_URL_3_arg "NO-OP // ::chroma/main-chroma-std-verify-url"
REMOTE_A_URL_4_arg "NO-OP // ::chroma/main-chroma-std-verify-url"
BRANCH_3_arg "NO-OP // ::chroma/-git-verify-branch"
BRANCH_\#_arg "NO-OP // ::chroma/-git-verify-branch"
REMOTE_2_arg "NO-OP // ::chroma/-git-verify-remote"
REMOTE_\#_arg "NO-OP // ::chroma/-git-verify-remote"
## }}}
@ -485,8 +485,8 @@ fsh__git__chroma__def=(
--find-renames=|-C|--find-copies=|-l|--diff-filter=|-S|-G|--find-object=|
--relative=|-O|--relative=|--inter-hunk-context=|--ignore-submodules=|
--src-prefix=|--dst-prefix=|--line-prefix=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--follow|--decorate|--no-decorate|--source|--use-mailmap|--full-diff|
--log-size|--all-match|--invert-grep|-i|--regexp-ignore-case|--basic-regexp|
@ -512,9 +512,9 @@ fsh__git__chroma__def=(
--ignore-blank-lines|-W|--function-context|--ext-diff|--no-ext-diff|
--textconv|--no-textconv|--ignore-submodules|--no-prefix|
--ita-invisible-in-index)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
LOG_1_arg "NO-OP // :::chroma/-git-verify-rev-range-or-file"
LOG_1_arg "NO-OP // ::chroma/-git-verify-rev-range-or-file"
##
## TAG
@ -524,38 +524,38 @@ fsh__git__chroma__def=(
"TAG_0_opt^" "
(-u|--local-user=|--cleanup=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| -m
<<>> NO-OP // :::chroma/-git-commit-msg-opt-action
<<>> NO-OP // :::chroma/-git-commit-msg-opt-ARG-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-action
<<>> NO-OP // ::chroma/-git-commit-msg-opt-ARG-action
|| (-F|--file)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/-git-verify-file
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/-git-verify-file
|| (-a|--annotate|-s|--sign|-f|-e|--edit)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| (-u|--local-user=|--cleanup=|-m|-F|--file|-a|--annotate|-s|--sign|
-f|-e|--edit):add
<<>> TAG_NEW_1_arg // COMMIT_2_arg // NO_MATCH_#_arg //
NO_MATCH_#_opt"
TAG_NEW_1_arg "NO-OP // :::chroma/-git-verify-correct-branch-name"
TAG_NEW_1_arg "NO-OP // ::chroma/-git-verify-correct-branch-name"
TAG_1_arg "NO-OP // :::chroma/-git-verify-tag-name"
TAG_1_arg "NO-OP // ::chroma/-git-verify-tag-name"
"TAG_D_0_opt^" "
(-d)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| -d:add
<<>> TAG_#_arg // NO_MATCH_#_opt
|| -d:del
<<>> TAG_0_opt // TAG_NEW_1_arg // COMMIT_2_arg"
"TAG_#_arg" "NO-OP // :::chroma/-git-verify-tag-name"
"TAG_#_arg" "NO-OP // ::chroma/-git-verify-tag-name"
"TAG_L_0_opt^" "
(-l)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| -l:add
<<>> TAG_L_0_opt // TAG_PAT_#_arg // NO_MATCH_#_opt
|| -l:del
@ -564,16 +564,16 @@ fsh__git__chroma__def=(
TAG_L_0_opt "
(-n|--contains|--no-contains|--points-at|--column=|--sort=|--format=|
--color=)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action
|| (--column|--no-column|--create-reflog|--merged|--no-merged|--color|-i)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
"TAG_PAT_#_arg" "NO-OP // :::chroma/main-chroma-std-verify-pattern"
"TAG_PAT_#_arg" "NO-OP // ::chroma/main-chroma-std-verify-pattern"
"TAG_V_0_opt^" "
(-v)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
|| -v:add
<<>> TAG_V_0_opt // TAG_#_arg // NO_MATCH_#_opt
|| -v:del
@ -581,8 +581,8 @@ fsh__git__chroma__def=(
TAG_V_0_opt "
--format=
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action
<<>> NO-OP // :::chroma/main-chroma-std-aopt-ARG-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action
<<>> NO-OP // ::chroma/main-chroma-std-aopt-ARG-action"
##
## All remaining subcommands
@ -590,13 +590,13 @@ fsh__git__chroma__def=(
## {{{
"subcmd:*" "CATCH_ALL_#_opt"
"CATCH_ALL_#_opt" "* <<>> NO-OP // :::chroma/main-chroma-std-aopt-SEMI-action"
"CATCH_ALL_#_opt" "* <<>> NO-OP // ::chroma/main-chroma-std-aopt-SEMI-action"
## }}}
)
# Called after entering just "git" on the command line
:chroma/-git-first-call() {
chroma/-git-first-call() {
# Called for the first time - new command
# FAST_HIGHLIGHT is used because it survives between calls, and
# allows to use a single global hash only, instead of multiple
@ -616,20 +616,20 @@ fsh__git__chroma__def=(
return 1
}
:chroma/-git-check-if-alias() {
chroma/-git-check-if-alias() {
local _wrd="$1"
local -a _result
typeset -ga fsh__chroma__git__aliases
_result=( ${(M)fsh__chroma__git__aliases[@]:#${_wrd}[[:space:]]##*} )
:chroma/main-chroma-print "Got is-alias-_result: $_result"
chroma/main-chroma-print "Got is-alias-_result: $_result"
[[ -n "$_result" ]] && \
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]="${${${_result#* }## ##}%% *}"
}
# A hook that returns the list of git's
# available subcommands in $reply
:chroma/-git-get-subcommands() {
chroma/-git-get-subcommands() {
local __svalue
integer __ivalue
LANG=C .fast-run-command "git help -a" chroma-${FAST_HIGHLIGHT[chroma-current]}-subcmd-list "" $(( 15 * 60 ))
@ -660,7 +660,7 @@ fsh__git__chroma__def=(
}
# A generic handler
:chroma/-git-verify-remote() {
chroma/-git-verify-remote() {
local _wrd="$4"
.fast-run-git-command "git remote" "chroma-git-remotes-$PWD" "" 10
[[ -n ${__lines_list[(r)$_wrd]} ]] && {
@ -671,7 +671,7 @@ fsh__git__chroma__def=(
}
# A generic handler - checks if given ref is correct
:chroma/-git-verify-ref() {
chroma/-git-verify-ref() {
local _wrd="$4"
_wrd="${_wrd%%:*}"
.fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-refs-$PWD" "refs/heads" 10
@ -681,15 +681,15 @@ fsh__git__chroma__def=(
}
# A generic handler - checks if given remote or group is correct
:chroma/-git-verify-remote-or-group() {
:chroma/-git-verify-remote "$@" && return 0
chroma/-git-verify-remote-or-group() {
chroma/-git-verify-remote "$@" && return 0
# The check for a group is to follow below
integer _start="$2" _end="$3"
local _scmd="$1" _wrd="$4"
}
# A generic handler - checks whether the file exists
:chroma/-git-verify-file() {
chroma/-git-verify-file() {
integer _start="$2" _end="$3" __pos __start __end
local _wrd="$4" bg
@ -723,7 +723,7 @@ fsh__git__chroma__def=(
}
# A generic handler - checks whether the file exists
:chroma/-git-verify-file-or-dir() {
chroma/-git-verify-file-or-dir() {
integer _start="$2" _end="$3" __pos __start __end retval
local _wrd="$4" bg
@ -759,7 +759,7 @@ fsh__git__chroma__def=(
return $retval
}
:chroma/-git-verify-branch() {
chroma/-git-verify-branch() {
local _wrd="$4"
.fast-run-git-command "git for-each-ref --format='%(refname:short)'" "chroma-git-branches-$PWD" "refs/heads" 10
if [[ -n ${__lines_list[(r)$_wrd]} ]] {
@ -771,7 +771,7 @@ fsh__git__chroma__def=(
}
}
:chroma/-git-verify-also-unfetched-ref() {
chroma/-git-verify-also-unfetched-ref() {
local _wrd="$4"
.fast-run-git-command "git config --get checkout.defaultRemote" \
"chroma-git-defaultRemote-$PWD" "" 10
@ -785,28 +785,28 @@ fsh__git__chroma__def=(
}
# A generic handler
:chroma/-git-file-or-ubranch-or-commit-verify() {
:chroma/-git-verify-commit "$@" && return
:chroma/-git-verify-file "$@" && return
:chroma/-git-verify-branch "$@" && return
:chroma/-git-verify-also-unfetched-ref "$@"
chroma/-git-file-or-ubranch-or-commit-verify() {
chroma/-git-verify-commit "$@" && return
chroma/-git-verify-file "$@" && return
chroma/-git-verify-branch "$@" && return
chroma/-git-verify-also-unfetched-ref "$@"
}
# A generic handler
:chroma/-git-file-or-dir-or-ubranch-or-commit-verify() {
:chroma/-git-verify-commit "$@" && return
:chroma/-git-verify-file-or-dir "$@" && return
:chroma/-git-verify-branch "$@" && return
:chroma/-git-verify-also-unfetched-ref "$@"
chroma/-git-file-or-dir-or-ubranch-or-commit-verify() {
chroma/-git-verify-commit "$@" && return
chroma/-git-verify-file-or-dir "$@" && return
chroma/-git-verify-branch "$@" && return
chroma/-git-verify-also-unfetched-ref "$@"
}
# A generic handler
:chroma/-git-verify-correct-branch-name() {
chroma/-git-verify-correct-branch-name() {
local _wrd="$4"
:chroma/-git-verify-commit "$@" && \
chroma/-git-verify-commit "$@" && \
{ __style=${FAST_THEME_NAME}incorrect-subtle; return 0; }
:chroma/-git-verify-remote "$@" && \
chroma/-git-verify-remote "$@" && \
{ __style=${FAST_THEME_NAME}incorrect-subtle; return 0; }
[[ "$_wrd" != ./* && "$_wrd" != *..* && "$_wrd" != *[~\^\ $'\t']* &&
@ -816,7 +816,7 @@ fsh__git__chroma__def=(
}
# A generic handler that checks if given commit reference is correct
:chroma/-git-verify-commit() {
chroma/-git-verify-commit() {
local _wrd="$4"
__lines_list=()
.fast-run-git-command --status "git rev-parse --verify --quiet \"$_wrd\"" \
@ -831,28 +831,28 @@ fsh__git__chroma__def=(
# A generic handler that checks if given commit reference
# is correct or if it's a file that exists
:chroma/-git-verify-commit-or-file() {
:chroma/-git-verify-commit "$@" && return
:chroma/-git-verify-file "$@"
chroma/-git-verify-commit-or-file() {
chroma/-git-verify-commit "$@" && return
chroma/-git-verify-file "$@"
}
# A generic handler that checks if given commit reference
# is correct or if it's a file or directives that exists
:chroma/-git-verify-commit-or-file-or-dir() {
:chroma/-git-verify-commit "$@" && return
:chroma/-git-verify-file-or-dir "$@"
chroma/-git-verify-commit-or-file-or-dir() {
chroma/-git-verify-commit "$@" && return
chroma/-git-verify-file-or-dir "$@"
}
# A generic handler that checks if given revision range
# is correct or if a file of that name exists
:chroma/-git-verify-rev-range-or-file() {
chroma/-git-verify-rev-range-or-file() {
local _wrd="$4"
:chroma/-git-verify-commit "$@" && return 0
chroma/-git-verify-commit "$@" && return 0
if [[ "$_wrd" = *..* ]]; then
(( FAST_HIGHLIGHT[chroma-git-reset-etc-saw-file] )) && {
:chroma/-git-verify-file "$@" && return 0
chroma/-git-verify-file "$@" && return 0
__style=${FAST_THEME_NAME}unknown-token
return 1
}
@ -861,14 +861,14 @@ fsh__git__chroma__def=(
return 0
fi
:chroma/-git-verify-file "$@" && \
chroma/-git-verify-file "$@" && \
{ FAST_HIGHLIGHT[chroma-git-reset-etc-saw-file]=1; return 0; }
__style=""
return 1
}
:chroma/-git-verify-tag-name() {
chroma/-git-verify-tag-name() {
local _wrd="$4"
.fast-run-git-command "git tag" "chroma-git-tags-$PWD" "" $(( 2*60 ))
[[ -n ${__lines_list[(r)$_wrd]} ]] && \
@ -877,13 +877,13 @@ fsh__git__chroma__def=(
}
# A handler for the commit's -m/--message options.Currently
# does the same what :chroma/main-chroma-std-aopt-action does
:chroma/-git-commit-msg-opt-action() {
:chroma/main-chroma-std-aopt-action "$@"
# does the same what chroma/main-chroma-std-aopt-action does
chroma/-git-commit-msg-opt-action() {
chroma/main-chroma-std-aopt-action "$@"
}
# A handler for the commit's -m/--message options' argument
:chroma/-git-commit-msg-opt-ARG-action() {
chroma/-git-commit-msg-opt-ARG-action() {
integer _start="$2" _end="$3"
local _scmd="$1" _wrd="$4"
@ -922,9 +922,9 @@ fsh__git__chroma__def=(
# A RESET handler
# TODO: differentiate tree-ish from commit
:chroma/-git-RESET-verify-commit-or-file() {
:chroma/-git-verify-commit "$@" && {
:chroma/-git-verify-file "$@" && {
chroma/-git-RESET-verify-commit-or-file() {
chroma/-git-verify-commit "$@" && {
chroma/-git-verify-file "$@" && {
# TODO: with -p/--patch, the <paths> are optional,
# and this argument will be taken as a commit in a
# specific circumstances
@ -943,7 +943,7 @@ fsh__git__chroma__def=(
return 0
}
:chroma/-git-verify-file "$@" && \
chroma/-git-verify-file "$@" && \
{ FAST_HIGHLIGHT[chroma-git-reset-etc-saw-file]=1; return 0; }
return 1

View file

@ -28,7 +28,7 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
:chroma/-subversion.ch/parse-revision() {
chroma/-subversion.ch/parse-revision() {
setopt local_options extendedglob warn_create_global typeset_silent
local __wrd="$1" __start_pos="$2" __end_pos="$3" __style __start __end
case $__wrd in
@ -40,7 +40,7 @@
(( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
}
:chroma/-subversion.ch/parse-target() {
chroma/-subversion.ch/parse-target() {
setopt local_options extendedglob warn_create_global typeset_silent
local __wrd="$1" __start_pos="$2" __end_pos="$3" __style __start __end
if [[ $__wrd == *@[^/]# ]]
@ -55,7 +55,7 @@
fi
(( __start=__start_pos-${#PREBUFFER}+$#place, __end=__end_pos-${#PREBUFFER}-$#rev, __start >= 0 )) \
&& reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}for-loop-separator]}")
:chroma/-subversion.ch/parse-revision $rev $((__start_pos+$#place+1)) $__end_pos
chroma/-subversion.ch/parse-revision $rev $((__start_pos+$#place+1)) $__end_pos
else
return 1
fi
@ -179,21 +179,21 @@ integer __idx1 __idx2
|| __style=${FAST_THEME_NAME}incorrect-subtle
;;
revision)
:chroma/-subversion.ch/parse-revision $__wrd $__start_pos $__end_pos
chroma/-subversion.ch/parse-revision $__wrd $__start_pos $__end_pos
;;
revision-pair)
local -a match mbegin mend
if [[ $__wrd = (#b)(\{[^}]##\}|[^:]##)(:)(*) ]]; then
:chroma/-subversion.ch/parse-revision $match[1] $__start_pos $(( __end_pos - ( mend[3]-mend[2] ) - 1 ))
:chroma/-subversion.ch/parse-revision $match[3] $(( __start_pos + ( mbegin[3]-mbegin[1] ) )) $__end_pos
chroma/-subversion.ch/parse-revision $match[1] $__start_pos $(( __end_pos - ( mend[3]-mend[2] ) - 1 ))
chroma/-subversion.ch/parse-revision $match[3] $(( __start_pos + ( mbegin[3]-mbegin[1] ) )) $__end_pos
(( __start=__start_pos-${#PREBUFFER}+(mbegin[2]-mbegin[1]), __end=__end_pos-${#PREBUFFER}-(mend[3]-mend[2]), __start >= 0 )) \
&& reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}for-loop-separator]}")
else
:chroma/-subversion.ch/parse-revision $__wrd $__start_pos $__end_pos
chroma/-subversion.ch/parse-revision $__wrd $__start_pos $__end_pos
fi
;;
target)
:chroma/-subversion.ch/parse-target $__wrd $__start_pos $__end_pos || return $?
chroma/-subversion.ch/parse-target $__wrd $__start_pos $__end_pos || return $?
;;
cmd)
this_word=1
@ -218,7 +218,7 @@ integer __idx1 __idx2
(( FAST_HIGHLIGHT[subversion-subcommand-arguments]+=1 ))
if [[ ( $FAST_HIGHLIGHT[subversion-subcommand] == (checkout|co|export|log|merge|switch|sw) && $FAST_HIGHLIGHT[subversion-subcommand-arguments] -eq 1 ) \
|| $FAST_HIGHLIGHT[subversion-subcommand] == (blame|praise|annotate|ann|cat|copy|cp|diff|info|list|ls|mergeinfo) ]]; then
:chroma/-subversion.ch/parse-target $__wrd $__start_pos $__end_pos || return $?
chroma/-subversion.ch/parse-target $__wrd $__start_pos $__end_pos || return $?
else
return 1
fi

View file

@ -17,7 +17,7 @@ fsh__zinit__chroma__def=(
subcmd:NULL "NULL_0_opt"
NULL_0_opt "(-help|--help|-h)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
"subcommands" "(help|man|self-update|cd|times|zstatus|load|light|unload|snippet|ls|ice|<ice|specification>|update|status|report|delete|loaded|list|cd|create|edit|glance|stress|changes|recently|clist|completions|cdisable|cname|cenable|cname|creinstall|cuninstall|csearch|compinit|dtrace|dstart|dstop|dunload|dreport|dclear|compile|uncompile|compiled|cdlist|cdreplay|cdclear|srv|recall|env-whitelist|bindkeys|module)"
@ -35,7 +35,7 @@ fsh__zinit__chroma__def=(
subcmd:ice "ICE_#_arg // NO_MATCH_#_opt"
"ICE_#_arg" "NO-OP // :::chroma/-zinit-check-ice-mod"
"ICE_#_arg" "NO-OP // ::chroma/-zinit-check-ice-mod"
## }}}
@ -48,9 +48,9 @@ fsh__zinit__chroma__def=(
NO_MATCH_#_arg"
SNIPPET_0_opt "(-f|--command)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
SNIPPET_1_arg "NO-OP // :::chroma/-zinit-verify-snippet"
SNIPPET_1_arg "NO-OP // ::chroma/-zinit-verify-snippet"
## }}}
@ -62,9 +62,9 @@ fsh__zinit__chroma__def=(
"subcmd:load"
"LOAD_1_arg // LOAD_2_arg // NO_MATCH_#_opt // NO_MATCH_#_arg"
LOAD_1_arg "NO-OP // :::chroma/-zinit-verify-plugin"
LOAD_1_arg "NO-OP // ::chroma/-zinit-verify-plugin"
LOAD_2_arg "NO-OP // :::chroma/-zinit-verify-plugin"
LOAD_2_arg "NO-OP // ::chroma/-zinit-verify-plugin"
## }}}
@ -76,9 +76,9 @@ fsh__zinit__chroma__def=(
"subcmd:(compile|uncompile|stress|edit|glance|recall|status|cd|changes)"
"PLGSNP_1_arg // PLGSNP_2_arg // NO_MATCH_#_opt // NO_MATCH_#_arg"
PLGSNP_1_arg "NO-OP // :::chroma/-zinit-verify-plugin-or-snippet"
PLGSNP_1_arg "NO-OP // ::chroma/-zinit-verify-plugin-or-snippet"
PLGSNP_2_arg "NO-OP // :::chroma/-zinit-verify-plugin-or-snippet"
PLGSNP_2_arg "NO-OP // ::chroma/-zinit-verify-plugin-or-snippet"
## }}}
@ -92,7 +92,7 @@ fsh__zinit__chroma__def=(
UPDATE_0_opt "
(--all|-r|--reset|-q|--quiet|-p|--parallel)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
## }}}
@ -105,7 +105,7 @@ fsh__zinit__chroma__def=(
NO_MATCH_#_arg"
LIGHT_0_opt "-b
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
## }}}
@ -118,11 +118,11 @@ fsh__zinit__chroma__def=(
NO_MATCH_#_arg"
UNLOAD_0_opt "-q
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
UNLOAD_1_arg "NO-OP // :::chroma/-zinit-verify-loaded-plugin"
UNLOAD_1_arg "NO-OP // ::chroma/-zinit-verify-loaded-plugin"
UNLOAD_2_arg "NO-OP // :::chroma/-zinit-verify-loaded-plugin"
UNLOAD_2_arg "NO-OP // ::chroma/-zinit-verify-loaded-plugin"
## }}}
@ -135,7 +135,7 @@ fsh__zinit__chroma__def=(
NO_MATCH_#_arg"
REPORT_0_opt "--all
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
## }}}
@ -149,7 +149,7 @@ fsh__zinit__chroma__def=(
DELETE_0_opt "
(--all|--clean|-y|--yes|-q|--quiet)
<<>> NO-OP // :::chroma/main-chroma-std-aopt-action"
<<>> NO-OP // ::chroma/main-chroma-std-aopt-action"
## }}}
@ -160,7 +160,7 @@ fsh__zinit__chroma__def=(
subcmd:cenable "COMPLETION_1_arg // NO_MATCH_#_opt // NO_MATCH_#_arg"
COMPLETION_1_arg "NO-OP // :::chroma/-zinit-verify-disabled-completion"
COMPLETION_1_arg "NO-OP // ::chroma/-zinit-verify-disabled-completion"
## }}}
@ -171,7 +171,7 @@ fsh__zinit__chroma__def=(
subcmd:cdisable "DISCOMPLETION_1_arg // NO_MATCH_#_opt // NO_MATCH_#_arg"
DISCOMPLETION_1_arg "NO-OP // :::chroma/-zinit-verify-completion"
DISCOMPLETION_1_arg "NO-OP // ::chroma/-zinit-verify-completion"
## }}}
@ -183,7 +183,7 @@ fsh__zinit__chroma__def=(
subcmd:uncompile "UNCOMPILE_1_arg // NO_MATCH_#_opt // NO_MATCH_#_arg"
UNCOMPILE_1_arg "NO-OP // :::chroma/-zinit-verify-compiled-plugin"
UNCOMPILE_1_arg "NO-OP // ::chroma/-zinit-verify-compiled-plugin"
## }}}
@ -193,17 +193,17 @@ fsh__zinit__chroma__def=(
## {{{
"subcmd:*" "CATCH_ALL_#_opt"
"CATCH_ALL_#_opt" "* <<>> NO-OP // :::chroma/main-chroma-std-aopt-SEMI-action"
"CATCH_ALL_#_opt" "* <<>> NO-OP // ::chroma/main-chroma-std-aopt-SEMI-action"
## }}}
)
#:chroma/-zinit-first-call() {
#chroma/-zinit-first-call() {
# This is being done in the proper place - in -fast-highlight-process
#FAST_HIGHLIGHT[chroma-zinit-ice-elements-svn]=0
#}
:chroma/-zinit-verify-plugin() {
chroma/-zinit-verify-plugin() {
local _scmd="$1" _wrd="$4"
[[ -d "$_wrd" ]] && \
@ -222,13 +222,13 @@ fsh__zinit__chroma__def=(
return 0
}
:chroma/-zinit-verify-plugin-or-snippet() {
:chroma/-zinit-verify-plugin "$1" "" "" "$4" || \
:chroma/-zinit-verify-snippet "$1" "" "" "$4"
chroma/-zinit-verify-plugin-or-snippet() {
chroma/-zinit-verify-plugin "$1" "" "" "$4" || \
chroma/-zinit-verify-snippet "$1" "" "" "$4"
return $?
}
:chroma/-zinit-verify-loaded-plugin() {
chroma/-zinit-verify-loaded-plugin() {
local _scmd="$1" _wrd="$4"
typeset -a plugins absolute1 absolute2 absolute3 normal
plugins=( "${ZINIT_REGISTERED_PLUGINS[@]:#_local/zinit}" )
@ -248,7 +248,7 @@ fsh__zinit__chroma__def=(
return 0
}
:chroma/-zinit-verify-completion() {
chroma/-zinit-verify-completion() {
local _scmd="$1" _wrd="$4"
# Find enabled completions
typeset -a completions
@ -262,7 +262,7 @@ fsh__zinit__chroma__def=(
return 0
}
:chroma/-zinit-verify-disabled-completion() {
chroma/-zinit-verify-disabled-completion() {
local _scmd="$1" _wrd="$4"
# Find enabled completions
typeset -a completions
@ -275,7 +275,7 @@ fsh__zinit__chroma__def=(
return 0
}
:chroma/-zinit-verify-compiled-plugin() {
chroma/-zinit-verify-compiled-plugin() {
local _scmd="$1" _wrd="$4"
typeset -a plugins
@ -297,7 +297,7 @@ fsh__zinit__chroma__def=(
return 1
}
:chroma/-zinit-verify-snippet() {
chroma/-zinit-verify-snippet() {
local _scmd="$1" url="$4" dirname local_dir
url="${${url#"${url%%[! $'\t']*}"}%/}"
id_as="${FAST_HIGHLIGHT[chroma-zinit-ice-elements-id-as]:-${ZINIT_ICE[id-as]:-$url}}"
@ -321,7 +321,7 @@ fsh__zinit__chroma__def=(
}
}
:chroma/-zinit-check-ice-mod() {
chroma/-zinit-check-ice-mod() {
local _scmd="$1" _wrd="$4"
[[ "$_wrd" = (svn(\'|\")*|svn) ]] && \
FAST_HIGHLIGHT[chroma-zinit-ice-elements-svn]=1

View file

@ -15,7 +15,7 @@
(( next_word = 2 | 8192 ))
:chroma/main-chroma-print() {
chroma/main-chroma-print() {
(( FAST_HIGHLIGHT[DEBUG] )) && print "$@" >> /tmp/fsh-dbg
}
@ -25,10 +25,10 @@ local __chroma_name="${1#\%}" __first_call="$2" __wrd="$3" __start_pos="$4" __en
[[ -z "$__chroma_name" ]] && return 1
# Load the fsh_{name-of-the-chroma}_chroma_def array
(( !FAST_HIGHLIGHT[-${__chroma_name}.ch-chroma-def] )) && :chroma/-${__chroma_name}.ch
(( !FAST_HIGHLIGHT[-${__chroma_name}.ch-chroma-def] )) && chroma/-${__chroma_name}.ch
:chroma/main-chroma-print -r -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:chroma/main-chroma-print -r -- @@@@@@@ local __chroma_name="${1#\%}" __first_call="$2" __wrd="$3" __start_pos="$4" __end_pos="$5" @@@@@@@
chroma/main-chroma-print -r -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
chroma/main-chroma-print -r -- @@@@@@@ local __chroma_name="${1#\%}" __first_call="$2" __wrd="$3" __start_pos="$4" __end_pos="$5" @@@@@@@
local __style __entry __value __action __handler __tmp __svalue __hspaces=$'\t ' __nl=$'\n' __ch_def_name
integer __idx1 __idx2 __start __end __ivalue __have_value=0
local -a __lines_list __avalue
@ -38,7 +38,7 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
(( __start=_start_pos-__PBUFLEN, __end=_end_pos-__PBUFLEN ))
# Handler that highlights the options
:chroma/main-chroma-std-aopt-action() {
chroma/main-chroma-std-aopt-action() {
integer _start="$2" _end="$3"
local _scmd="$1" _wrd="$4"
@ -51,7 +51,7 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
}
# Handler that highlights the options' arguments
:chroma/main-chroma-std-aopt-ARG-action() {
chroma/main-chroma-std-aopt-ARG-action() {
integer _start="$2" _end="$3"
local _scmd="$1" _wrd="$4"
@ -61,7 +61,7 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
}
# This handler also highlights explicit arguments, i.e. --opt=the-explicit-arg
:chroma/main-chroma-std-aopt-SEMI-action() {
chroma/main-chroma-std-aopt-SEMI-action() {
integer _start="$2" _end="$3"
local _scmd="$1" _wrd="$4"
@ -75,7 +75,7 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
}
# A handler which verifies the token as an GIT url
:chroma/main-chroma-std-verify-url() {
chroma/main-chroma-std-verify-url() {
setopt localoptions extendedglob
local _wrd="$4"
integer url_correct=0
@ -99,21 +99,21 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
}
# A handler which verifies the token as a shell wildcard
:chroma/main-chroma-std-verify-pattern() {
chroma/main-chroma-std-verify-pattern() {
setopt localoptions extendedglob
local _wrd="$4"
__style=${FAST_THEME_NAME}globbing-ext
}
# Creates a hash table for given option set (an *_opt field in the chroma def.)
:chroma/main-create-OPTION-hash.ch() {
chroma/main-create-OPTION-hash.ch() {
local __subcmd="$1" __option_set_id="$2" __the_hash_name="$3" __ __e __el __the_hash_name __var_name
local -a __split __sp __s
:chroma/main-chroma-print -rl "======================" " **## STARTING ##** :chroma/main-##CREATE##-option-HASH.ch // subcmd:$__subcmd // option_set_id:$__option_set_id // h-nam:$__the_hash_name"
:chroma/main-chroma-print "[D] Got option-set: ${(j:,:)__option_set_id}"
→chroma/main-chroma-print -rl "======================" " **## STARTING ##** →chroma/main-##CREATE##-option-HASH.ch // subcmd:$__subcmd // option_set_id:$__option_set_id // h-nam:$__the_hash_name"
chroma/main-chroma-print "[D] Got option-set: ${(j:,:)__option_set_id}"
typeset -gA "$__the_hash_name"
:chroma/main-chroma-print "[E] __the_hash_name ${__the_hash_name}:[$__option_set_id]"
chroma/main-chroma-print "[E] __the_hash_name ${__the_hash_name}:[$__option_set_id]"
# Split on ||
__ch_def_name="fsh__${__chroma_name}__chroma__def[${__option_set_id}]"
@ -122,13 +122,13 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
# Remove only leading and trailing whitespace
__split=( "${__split[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
:chroma/main-chroma-print -rl "[F] Got ||-__split: _________" ${${(@)${${__split[@]##[[:space:]]##}[@]//[${__hspaces}]##/ }[@]//[${__nl}]##/$__nl}[@]//(#s)/:::} "_________"
chroma/main-chroma-print -rl "[F] Got ||-__split: _________" ${${(@)${${__split[@]##[[:space:]]##}[@]//[${__hspaces}]##/ }[@]//[${__nl}]##/$__nl}[@]//(#s)/:::} "_________"
for __el in $__split; do
__sp=( "${(@s:<<>>:)__el}" )
[[ ${#__sp} -eq 1 && -z "${__sp[1]}" ]] && __sp=()
__sp=( "${__sp[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
:chroma/main-chroma-print -l -- "Processing an ||-part - got <<>>-split: _________" "${${__sp[@]}[@]/(#s)/-\\t}" "_________"
chroma/main-chroma-print -l -- "Processing an ||-part - got <<>>-split: _________" "${${__sp[@]}[@]/(#s)/-\\t}" "_________"
__e="${__sp[1]}"
local __e1=${${__e#\(}%\)(:add|:del|)}
local __e2=${(M)__e##\(*\)(:add|:del)}
@ -145,12 +145,12 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
for __ in $__s; do
__=${__%\^}
[[ "$__" = -*:(add|del) ]] && __var_name="${__the_hash_name}[${__}-directive]" || __var_name="${__the_hash_name}[${__}-opt-action]"
:chroma/main-chroma-print "${(r:70:: :):-${__var_name}} := >>${__sp[1]}${${${#__sp}:#(0|1)}:+ +}<<"
chroma/main-chroma-print "${(r:70:: :):-${__var_name}} := >>${__sp[1]}${${${#__sp}:#(0|1)}:+ +}<<"
: ${(P)__var_name::=${__sp[1]}${${${#__sp}:#(0|1)}:+ +}}
if (( ${#__sp} >= 2 )); then
__var_name="${__the_hash_name}[${__}-opt-arg-action]"
:chroma/main-chroma-print "${(r:70:: :):-${__var_name}} := >>${__sp[2]}<<}"
chroma/main-chroma-print "${(r:70:: :):-${__var_name}} := >>${__sp[2]}<<}"
: ${(P)__var_name::=$__sp[2]}
fi
done
@ -158,18 +158,18 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
}
# Processes given token
:chroma/main-process-token.ch() {
chroma/main-process-token.ch() {
local __subcmd="$1" __wrd="$2" __val __var_name __main_hash_name __the_hash_name __i __size
local -a __splitted __split __added
:chroma/main-chroma-print "\n******************* Starting :chroma/main-process-token <<$__wrd>>// subcmd:${(qq)__subcmd}"
→chroma/main-chroma-print "\n******************* Starting →chroma/main-process-token <<$__wrd>>// subcmd:${(qq)__subcmd}"
__main_hash_name="fsh__chroma__main__${${FAST_HIGHLIGHT[chroma-current]//[^a-zA-Z0-9_]/_}//(#b)([\#\^\*])/${map[${match[1]}]}}"
__var_name="${__main_hash_name}[subcmd:$__subcmd]"
__splitted=( "${(@s://:P)__var_name}" )
[[ ${#__splitted} -eq 1 && -z "${__splitted[1]}" ]] && __splitted=()
__splitted=( "${__splitted[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
:chroma/main-chroma-print -rl -- "[B] MAIN-PROCESS-TOKEN: got [OPTION/ARG-**S-E-T-S**] //-splitted from subcmd:$__subcmd: ${${(j:, :)__splitted}:-EMPTY-SET!}" "----- __splitted\\Deleted: -----" ${${(j:, :)${__splitted[@]:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}}:-EMPTY-SET (deleted)!} "----- Added\\Deleted: -----" ${${(j:, :)${${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}}:-EMPTY-SET (added)!} -----\ Deleted:\ ----- ${(j:, :)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}} >> /tmp/reply
chroma/main-chroma-print -rl -- "[B] MAIN-PROCESS-TOKEN: got [OPTION/ARG-**S-E-T-S**] //-splitted from subcmd:$__subcmd: ${${(j:, :)__splitted}:-EMPTY-SET!}" "----- __splitted\\Deleted: -----" ${${(j:, :)${__splitted[@]:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}}:-EMPTY-SET (deleted)!} "----- Added\\Deleted: -----" ${${(j:, :)${${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}}:-EMPTY-SET (added)!} -----\ Deleted:\ ----- ${(j:, :)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}} >> /tmp/reply
(( ! ${#__splitted} )) && {
__var_name="${__main_hash_name}[subcmd:*]"
@ -179,24 +179,24 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
(( ! ${#__splitted} )) && return 1
}
:chroma/main-chroma-print -rl -- "---NO-HASH-CREATE-FROM-NOW-ON---"
chroma/main-chroma-print -rl -- "---NO-HASH-CREATE-FROM-NOW-ON---"
if [[ -z "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]}" ]]; then
:chroma/main-chroma-print -rl -- "-z OPT-WITH-ARG-ACTIVE == true"
chroma/main-chroma-print -rl -- "-z OPT-WITH-ARG-ACTIVE == true"
if [[ "$__wrd" = -* ]]; then
:chroma/main-chroma-print "1st-PATH (-z opt-with-arg-active, non-opt-arg branch, i.e. OPTION BRANCH) [#${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}]"
chroma/main-chroma-print "1st-PATH (-z opt-with-arg-active, non-opt-arg branch, i.e. OPTION BRANCH) [#${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}]"
for __val in ${__splitted[@]:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})} ${${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}; do
[[ "${__val}" != "${__val%%_([0-9]##|\#)##*}"_${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}_opt(\*|\^|) && "${__val}" != "${__val%%_([0-9]##|\#)*}"_"#"_opt(\*|\^|) ]] && { :chroma/main-chroma-print "DIDN'T MATCH $__val / arg counter:${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}" ; continue; } || :chroma/main-chroma-print "Got candidate: $__val"
[[ "${__val}" != "${__val%%_([0-9]##|\#)##*}"_${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}_opt(\*|\^|) && "${__val}" != "${__val%%_([0-9]##|\#)*}"_"#"_opt(\*|\^|) ]] && { chroma/main-chroma-print "DIDN'T MATCH $__val / arg counter:${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}" ; continue; } || chroma/main-chroma-print "Got candidate: $__val"
# Create the hash cache-parameter if needed
__the_hash_name="fsh__chroma__${FAST_HIGHLIGHT[chroma-current]//[^a-zA-Z0-9_]/_}__${__subcmd//[^a-zA-Z0-9_]/_}__${${__val//(#b)([\#\^\*])/${map[${match[1]}]}}//[^a-zA-Z0-9_]/_}"
[[ "$__val" = *_opt(\*|\^|) && "${(P)+__the_hash_name}" -eq 0 ]] && :chroma/main-create-OPTION-hash.ch "$__subcmd" "$__val" "$__the_hash_name" || :chroma/main-chroma-print "Not creating, the hash already exists..."
[[ "$__val" = *_opt(\*|\^|) && "${(P)+__the_hash_name}" -eq 0 ]] && →chroma/main-create-OPTION-hash.ch "$__subcmd" "$__val" "$__the_hash_name" || →chroma/main-chroma-print "Not creating, the hash already exists..."
# Try dedicated-entry for the option
__var_name="${__the_hash_name}[${${${${(M)__wrd#?*=}:+${__wrd%=*}=}:-$__wrd}}-opt-action]"
__split=( "${(@s://:P)__var_name}" )
[[ ${#__split} -eq 1 && -z "${__split[1]}" ]] && __split=()
# If no result, then try with catch-all entry
(( ! ${#__split} )) && {
:chroma/main-chroma-print "% no ${(q-)${${${(M)__wrd#?*=}:+${__wrd%=*}=}:-$__wrd}}-opt-action, retrying with *-opt-action" "|__var_name|:$__var_name"
chroma/main-chroma-print "% no ${(q-)${${${(M)__wrd#?*=}:+${__wrd%=*}=}:-$__wrd}}-opt-action, retrying with *-opt-action" "|__var_name|:$__var_name"
__var_name="${__the_hash_name}[*-opt-action]"
__split=( "${(@s://:P)__var_name}" )
[[ ${#__split} -eq 1 && -z "${__split[1]}" ]] && __split=()
@ -204,19 +204,19 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
__svalue="$__var_name"
# Remove whitespace
__split=( "${__split[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
:chroma/main-chroma-print -l -- "\`$__val' // ${#__split} // $__wrd: (ch.run #${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]}), deref. of \`$__var_name'"
chroma/main-chroma-print -l -- "\`$__val' // ${#__split} // $__wrd: (ch.run #${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]}), deref. of \`$__var_name'"
if (( ${#__split} )); then
:chroma/main-chroma-print -l -- "Got split of {\$#__split:$#__split} ${__wrd}-opt-action or *-opt-action" "${${(q-)__split[@]}[@]/(#s)/->\\t}"
chroma/main-chroma-print -l -- "Got split of {\$#__split:$#__split} ${__wrd}-opt-action or *-opt-action" "${${(q-)__split[@]}[@]/(#s)/->\\t}"
if [[ "${__split[2]}" = *[[:blank:]]+ ]]; then
:chroma/main-chroma-print "YES handling the value (the OPT.ARGUMENT)! [${__split[2]}]"
chroma/main-chroma-print "YES handling the value (the OPT.ARGUMENT)! [${__split[2]}]"
if [[ "$__wrd" = *=* ]]; then
:chroma/main-chroma-print "The-immediate Arg-Acquiring, of option"
chroma/main-chroma-print "The-immediate Arg-Acquiring, of option"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]="${__svalue%-opt-action\]}-opt-arg-action]"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-arg]="${__wrd#*=}"
__have_value=2
else
:chroma/main-chroma-print "Enable Arg-Awaiting, of option"
:chroma/main-chroma-print "FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]=\"${__svalue%-opt-action\]}-opt-arg-action]\""
chroma/main-chroma-print "Enable Arg-Awaiting, of option"
chroma/main-chroma-print "FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]=\"${__svalue%-opt-action\]}-opt-arg-action]\""
__have_value=0
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]="${__svalue%-opt-action\]}-opt-arg-action]"
fi
@ -240,27 +240,27 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
# First: del-directive
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]+="${(j: :)__split[__ivalue+1,__tmp]} "
:chroma/main-chroma-print -rl ":add / :del directives: __ivalue:$__ivalue, THE __SPLIT[#$__tmp]: " "${__split[@]}" "//" "The FAST_HIGHLIGHT[chroma-*deleted-nodes]: " ${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]} >> /tmp/reply
chroma/main-chroma-print -rl ":add / :del directives: __ivalue:$__ivalue, THE __SPLIT[#$__tmp]: " "${__split[@]}" "//" "The FAST_HIGHLIGHT[chroma-*deleted-nodes]: " ${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]} >> /tmp/reply
# Second: add-directive
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]+="${(j: :)__split[1,__ivalue]} "
fi
[[ "$__handler" = ::[^[:space:]]* ]] && __handler="${__handler#::}" || __handler=""
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { :chroma/main-chroma-print -rl -- "Running handler(1): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ "$__have_value" -ne 2 && -n "$__action" && "$__action" != "NO-OP" ]] && { :chroma/main-chroma-print -rl "Running action (1): $__action" ; eval "() { $__action; }"; }
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { chroma/main-chroma-print -rl -- "Running handler(1): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ "$__have_value" -ne 2 && -n "$__action" && "$__action" != "NO-OP" ]] && { chroma/main-chroma-print -rl "Running action (1): $__action" ; eval "() { $__action; }"; }
[[ "$__val" != *\* ]] && break
else
:chroma/main-chroma-print -rl -- "NO-MATCH ROUTE TAKEN"
chroma/main-chroma-print -rl -- "NO-MATCH ROUTE TAKEN"
fi
done
else
:chroma/main-chroma-print "1st-PATH-B (-z opt-with-arg-active, non-opt-arg branch, ARGUMENT BRANCH [#${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}]) //// added-nodes: ${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}"
chroma/main-chroma-print "1st-PATH-B (-z opt-with-arg-active, non-opt-arg branch, ARGUMENT BRANCH [#${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}]) //// added-nodes: ${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}"
for __val in ${__splitted[@]:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})} ${${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}:#(${(~j:|:)${(@)=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}})}; do
[[ "${__val}" != "${__val%%_([0-9]##|\#)*}"_"${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"_arg(\*|\^|) && "${__val}" != "${__val%%_([0-9]##|\#)*}"_"#"_arg(\*|\^|) ]] && { :chroma/main-chroma-print "Continuing for $__val / arg counter ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}" ; continue }
[[ "${__val}" != "${__val%%_([0-9]##|\#)*}"_"${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"_arg(\*|\^|) && "${__val}" != "${__val%%_([0-9]##|\#)*}"_"#"_arg(\*|\^|) ]] && { chroma/main-chroma-print "Continuing for $__val / arg counter ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}" ; continue }
# Create the hash cache-parameter if needed
__the_hash_name="fsh__chroma__${FAST_HIGHLIGHT[chroma-current]//[^a-zA-Z0-9_]/_}__${__subcmd//[^a-zA-Z0-9_]/_}__${${__val//\#/H}//[^a-zA-Z0-9_]/_}"
__action="" __handler=""
:chroma/main-chroma-print "A hit, chosen __val:$__val!"
chroma/main-chroma-print "A hit, chosen __val:$__val!"
__ch_def_name="fsh__${__chroma_name}__chroma__def[$__val]"
__split=( "${(P@s:<<>>:)__ch_def_name}" )
__split=( "${__split[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
@ -271,13 +271,13 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
# Verify if it's the expected argument
[[ "${__sp[1]}" = *:::::* && "$__wrd" != ${~${__sp[1]%% ##:::::*}} ]] && \
{ :chroma/main-chroma-print -r "mismatch ${__sp[1]%% ##:::::*} != $__wrd, continuing" ; continue; }
{ chroma/main-chroma-print -r "mismatch ${__sp[1]%% ##:::::*} != $__wrd, continuing" ; continue; }
:chroma/main-chroma-print -l -- "Got action record for $__val, i.e. the split:" "${__sp[@]//(#s)/-\t}" "_________"
chroma/main-chroma-print -l -- "Got action record for $__val, i.e. the split:" "${__sp[@]//(#s)/-\t}" "_________"
[[ "${__sp[2]}" = ::[^[:space:]]* ]] && __handler="${__sp[2]#::}" || { [[ -n "$__handler" && "$__handler" != "NO-OP" ]] && :chroma/main-chroma-print "=== Error === In chroma definition: a handler entry ${(q)__sp[2]} without leading \`::'" ; }
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { :chroma/main-chroma-print -rl -- "Running handler(3): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ -n "$__action" && "$__action" != "NO-OP" ]] && { :chroma/main-chroma-print -rl -- "Running action(3): $__action" ; eval "() { $__action; } \"${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}\" \"$__start\" \"$__end\" \"$__wrd\""; }
[[ "${__sp[2]}" = ::[^[:space:]]* ]] && __handler="${__sp[2]#::}" || { [[ -n "$__handler" && "$__handler" != "NO-OP" ]] && chroma/main-chroma-print "=== Error === In chroma definition: a handler entry ${(q)__sp[2]} without leading \`::'" ; }
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { chroma/main-chroma-print -rl -- "Running handler(3): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ -n "$__action" && "$__action" != "NO-OP" ]] && { chroma/main-chroma-print -rl -- "Running action(3): $__action" ; eval "() { $__action; } \"${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}\" \"$__start\" \"$__end\" \"$__wrd\""; }
# Check for argument directives (like :add)
if (( ${#__split} >= 2 )); then
@ -289,54 +289,54 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]+="${__splitted[1]#del:} ${(j: :)__splitted[2,-1]} "
fi
done
:chroma/main-chroma-print -l "ARGUMENT :add / :del directives: THE __SPLIT[#${#__split}]: " "${__split[@]//(#s)/-\\t}" "//" "The FAST_HIGHLIGHT[chroma-*deleted-nodes]: " ${(@)${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}//(#s)/-\\t} "The FAST_HIGHLIGHT[chroma-*added-nodes]: " ${(@)${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}//(#s)/-\\t}
chroma/main-chroma-print -l "ARGUMENT :add / :del directives: THE __SPLIT[#${#__split}]: " "${__split[@]//(#s)/-\\t}" "//" "The FAST_HIGHLIGHT[chroma-*deleted-nodes]: " ${(@)${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-deleted-nodes]}//(#s)/-\\t} "The FAST_HIGHLIGHT[chroma-*added-nodes]: " ${(@)${=FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-added-nodes]}//(#s)/-\\t}
fi
[[ "$__val" != *\* ]] && break
done
fi
else
:chroma/main-chroma-print -- "2nd-PATH (-n opt-with-arg-active) NON-EMPTY arg-active:\nThe actual opt-val <<< \$__wrd:$__wrd >>> store (after the \`Arg-Awaiting' in the chroma-run: #$(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]-1 )) [current: #$(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr] ))])"
chroma/main-chroma-print -- "2nd-PATH (-n opt-with-arg-active) NON-EMPTY arg-active:\nThe actual opt-val <<< \$__wrd:$__wrd >>> store (after the \`Arg-Awaiting' in the chroma-run: #$(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]-1 )) [current: #$(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr] ))])"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-arg]="$__wrd"
__have_value=1
fi
# Execute the action if not during simulated opt-argument (--opt=...)
:chroma/main-chroma-print "** BEFORE: \`if (( __have_value ))'"
chroma/main-chroma-print "** BEFORE: \`if (( __have_value ))'"
if (( __have_value )); then
:chroma/main-chroma-print "In the \`if (( __have_value ))' [have_value: $__have_value]"
chroma/main-chroma-print "In the \`if (( __have_value ))' [have_value: $__have_value]"
# Split
__var_name="${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]}"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]=""
__split=( "${(@s://:P)__var_name}" )
[[ ${#__split} -eq 1 && -z "${__split[1]}" ]] && { :chroma/main-chroma-print -rl "NULL at __var_name:$__var_name" ; __split=(); }
[[ ${#__split} -eq 1 && -z "${__split[1]}" ]] && { chroma/main-chroma-print -rl "NULL at __var_name:$__var_name" ; __split=(); }
__split=( "${__split[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" )
# Remember 1st level action
(( __have_value == 2 )) && __value="$__action" || __value=""
if (( ${#__split} )); then
:chroma/main-chroma-print -l -- "Got //-split (3, for opt-ARG-action, from [$__var_name]):" "${${(q-)__split[@]}[@]/(#s)/+\\t}"
chroma/main-chroma-print -l -- "Got //-split (3, for opt-ARG-action, from [$__var_name]):" "${${(q-)__split[@]}[@]/(#s)/+\\t}"
__action="${__split[1]}"
__handler="${__split[2]}"
[[ "$__handler" = ::[^[:space:]]* ]] && __handler="${__handler#::}"
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { :chroma/main-chroma-print -rl -- "Running handler(2): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ -n "$__action" && "$__action" != "NO-OP" ]] && { :chroma/main-chroma-print -rl -- "Running action(2): $__action" ; eval "$__action"; }
:chroma/main-chroma-print -rl -- "The __action value: [$__value]"
[[ "$__have_value" -eq 2 && -n "$__value" && "$__value" != "NO-OP" ]] && { :chroma/main-chroma-print -rl "Running action (of 1, at 2): $__value" ; eval "$__value"; }
[[ -n "$__handler" && "$__handler" != "NO-OP" ]] && { chroma/main-chroma-print -rl -- "Running handler(2): $__handler" ; "$__handler" "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]:-NULL}" "$__start" "$__end" "$__wrd"; }
[[ -n "$__action" && "$__action" != "NO-OP" ]] && { chroma/main-chroma-print -rl -- "Running action(2): $__action" ; eval "$__action"; }
chroma/main-chroma-print -rl -- "The __action value: [$__value]"
[[ "$__have_value" -eq 2 && -n "$__value" && "$__value" != "NO-OP" ]] && { chroma/main-chroma-print -rl "Running action (of 1, at 2): $__value" ; eval "$__value"; }
fi
fi
:chroma/main-chroma-print -- "_________ Exiting :chroma/main-process-token.ch $__subcmd / $__wrd _________"
→chroma/main-chroma-print -- "_________ Exiting →chroma/main-process-token.ch $__subcmd / $__wrd _________"
}
# Iterates over the chroma def. fields and creates initial
# fields in the fsh__${__chroma_name}__chroma__def hash
:chroma/-pre_process_chroma_def.ch() {
chroma/-pre_process_chroma_def.ch() {
local __key __value __ke _val __the_hash_name="$1" __var_name
local -a __split
:chroma/main-chroma-print -rl -- "Starting PRE_PROCESS for __the_hash_name:$__the_hash_name"
chroma/main-chroma-print -rl -- "Starting PRE_PROCESS for __the_hash_name:$__the_hash_name"
__ch_def_name="fsh__${__chroma_name}__chroma__def[subcommands]"
local __subcmds="${(P)__ch_def_name}"
@ -348,7 +348,7 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
__var_name="${__the_hash_name}[subcommands]"
: ${(P)__var_name::=$__subcmds}
fi
:chroma/main-chroma-print "Got SUBCOMMANDS: ${(P)__var_name}"
chroma/main-chroma-print "Got SUBCOMMANDS: ${(P)__var_name}"
__ch_def_name="fsh__${__chroma_name}__chroma__def[subcmd-hook]"
local __subcmd_hook="${(P)__ch_def_name}"
@ -366,13 +366,13 @@ map=( "#" "_H" "^" "_D" "*" "_S" )
__var_name="${__the_hash_name}[subcmd:$__ke]"
__ch_def_name="fsh__${__chroma_name}__chroma__def[$__key]"
: ${(P)__var_name::=${(P)__ch_def_name}}
:chroma/main-chroma-print -rl -- "Storred ${__var_name}=chroma_def[$__key], i.e. = ${(P)__ch_def_name}"
chroma/main-chroma-print -rl -- "Storred ${__var_name}=chroma_def[$__key], i.e. = ${(P)__ch_def_name}"
done
done
}
if (( __first_call )); then
:chroma/-${__chroma_name}-first-call
chroma/-${__chroma_name}-first-call
FAST_HIGHLIGHT[chroma-current]="$__wrd"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]=0
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-got-subcommand]=0
@ -386,8 +386,8 @@ if (( __first_call )); then
__the_hash_name="fsh__chroma__main__${${FAST_HIGHLIGHT[chroma-current]//[^a-zA-Z0-9_]/_}//(#b)([\#\^])/${map[${match[1]}]}}"
(( 0 == ${(P)+__the_hash_name} )) && {
typeset -gA "$__the_hash_name"
:chroma/-pre_process_chroma_def.ch "$__the_hash_name"
} || :chroma/main-chroma-print "...No... [\${+$__the_hash_name} ${(P)+__the_hash_name}]"
chroma/-pre_process_chroma_def.ch "$__the_hash_name"
} || chroma/main-chroma-print "...No... [\${+$__the_hash_name} ${(P)+__the_hash_name}]"
return 1
else
(( ++ FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr] ))
@ -397,11 +397,11 @@ else
# "starts new command", if so pass-through – chroma ends
[[ "$__arg_type" = 3 ]] && return 2
:chroma/main-chroma-print "== @@ Starting @@ #${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]} Main-Chroma-call == // << __WORD:$__wrd >> ## Subcommand: ${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL} //@@// -n option-with-arg-active:${(q-)FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]}"
chroma/main-chroma-print "== @@ Starting @@ #${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-call-nr]} Main-Chroma-call == // << __WORD:$__wrd >> ## Subcommand: ${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL} //@@// -n option-with-arg-active:${(q-)FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]}"
if [[ "$__wrd" = -* || -n "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-option-with-arg-active]}"
]]; then
:chroma/main-chroma-print "## The \`if -*' i.e. \`IF OPTION' MAIN branch"
:chroma/main-process-token.ch "${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL}" "$__wrd"
chroma/main-chroma-print "## The \`if -*' i.e. \`IF OPTION' MAIN branch"
chroma/main-process-token.ch "${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL}" "$__wrd"
else
# If at e.g. '>' or destination/source spec (of the redirection)
if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
@ -410,17 +410,17 @@ else
__the_hash_name="fsh__chroma__main__${${FAST_HIGHLIGHT[chroma-current]//[^a-zA-Z0-9_]/_}//(#b)([\#\^])/${map[${match[1]}]}}"
__var_name="${__the_hash_name}[subcommands]"
if [[ "$__wrd" = ${(P)~__var_name} ]]; then
:chroma/main-chroma-print "GOT-SUBCOMMAND := $__wrd, subcmd verification / OK"
chroma/main-chroma-print "GOT-SUBCOMMAND := $__wrd, subcmd verification / OK"
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-got-subcommand]=1
FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]="$__wrd"
__var_name="${__the_hash_name}[subcmd-hook]"
(( ${(P)+__var_name} )) && { :chroma/main-chroma-print -r -- "Running subcmd-hook: ${(P)__var_name}" ; "${(P)__var_name}" "$__wrd"; }
(( ${(P)+__var_name} )) && { chroma/main-chroma-print -r -- "Running subcmd-hook: ${(P)__var_name}" ; "${(P)__var_name}" "$__wrd"; }
__style="${FAST_THEME_NAME}subcommand"
else
:chroma/main-chroma-print "subcmd verif / NOT OK; Incrementing the COUNTER-ARG ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]} -> $(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] + 1 ))" >> /tmp/fsh-dbg
chroma/main-chroma-print "subcmd verif / NOT OK; Incrementing the COUNTER-ARG ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]} -> $(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] + 1 ))" >> /tmp/fsh-dbg
(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] += 1 ))
:chroma/main-chroma-print "UNRECOGNIZED ARGUMENT ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"
:chroma/main-process-token.ch "${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL}" "$__wrd"
chroma/main-chroma-print "UNRECOGNIZED ARGUMENT ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"
chroma/main-process-token.ch "${${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}:-NULL}" "$__wrd"
fi
} else {
__wrd="${__wrd//\`/x}"
@ -434,12 +434,12 @@ else
return 1
}
:chroma/main-chroma-print "Incrementing the COUNTER-ARG ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]} -> $(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] + 1 ))"
chroma/main-chroma-print "Incrementing the COUNTER-ARG ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]} -> $(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] + 1 ))"
(( FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg] += 1 ))
:chroma/main-chroma-print "ARGUMENT ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"
chroma/main-chroma-print "ARGUMENT ${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-counter-arg]}"
:chroma/main-chroma-print "ELSE *-got-subcommand == 1 is TRUE"
:chroma/main-process-token.ch "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}" "$__wrd"
chroma/main-chroma-print "ELSE *-got-subcommand == 1 is TRUE"
chroma/main-process-token.ch "${FAST_HIGHLIGHT[chroma-${FAST_HIGHLIGHT[chroma-current]}-subcommand]}" "$__wrd"
}
fi
fi