From 31dec14de96bd4ac007e27df021fd61ba417fae1 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Wed, 12 Jun 2019 15:32:21 +0200 Subject: [PATCH] main-chroma,-git.ch: `revert' support. Support for :del/:add after (a|b) --- chroma/-git.ch | 28 ++++++++++++++++++++++------ chroma/main-chroma.ch | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/chroma/-git.ch b/chroma/-git.ch index 852794d..f8eb9d4 100644 --- a/chroma/-git.ch +++ b/chroma/-git.ch @@ -128,7 +128,7 @@ fsh__git__chroma__def=( <<>> __style=\${FAST_THEME_NAME}single-hyphen-option // NO-OP" ## - ## `COMMIT' + ## COMMIT ## "subcmd:commit" "COMMIT_#_opt // FILE_#_arg // NO_MATCH_#_opt" @@ -152,7 +152,7 @@ fsh__git__chroma__def=( "FILE_#_arg" "NO-OP // chroma/-git-verify-file" ## - ## `MERGE' + ## MERGE ## "subcmd:merge" "MERGE_0_opt // MERGE_1_arg" @@ -184,12 +184,28 @@ fsh__git__chroma__def=( "RESET_#_arg" "NO-OP // ::chroma/-git-RESET-verify-commit-or-file" ## - ## Unfinished / old follow + ## REVERT ## - # `REVERT' - "subcmd:revert" "P_1_arg" - "P_1_arg" "// ::-chroma-git-rev-verify" + "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 + || (-e|--edit|--no-edit|-n|--no-commit|-s|--signoff) + <<>> NO-OP // ::chroma/main-chroma-std-aopt-action" + + "REVERT_SEQUENCER_0_opt^" " + (--continue|--quit|--abort) + <<>> NO-OP // ::chroma/main-chroma-std-aopt-action + || (--continue|--quit|--abort):del + <<>> REVERT_0_opt // REVERT_#_arg" + + "REVERT_#_arg" "NO-OP // ::chroma/-git-verify-commit" + + ## + ## Unfinished / old follow + ## # `DIFF' "subcmd:diff" "Q_1_arg // Q_2_arg" diff --git a/chroma/main-chroma.ch b/chroma/main-chroma.ch index b53c326..7f7e9eb 100644 --- a/chroma/main-chroma.ch +++ b/chroma/main-chroma.ch @@ -99,7 +99,7 @@ chroma/main-create-OPTION-hash.ch() { chroma/main-chroma-print -l -- "Processing an ||-part - got <<>>-split: _________" "${${__sp[@]}[@]/(#s)/-\\t}" "_________" >> /tmp/fsh-dbg __e="${__sp[1]}" - __s=( "${(@s:|:)${${__e#\(}%\)}}" ) + __s=( "${(@)${(@s:|:)${${__e#\(}%\)(:add|:del|)}}//(#e)/${${(M)__e##\(*\)(:add|:del)}:+${(M)__e%(:add|:del)}}}" ) [[ ${#__s} -eq 1 && -z "${__s[1]}" ]] && __s=() __s=( "${__s[@]//((#s)[[:space:]]##|[[:space:]]##(#e))/}" ) shift __sp