diff --git a/sh/alias/git.sh b/sh/alias/git.sh index 3e6386e..35402d9 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -516,6 +516,14 @@ a__git_re_set_hard() { "${@}" } +# show a commit +gsc() { a__git_show_commit "${@}"; } +a__git_show_commit() { + git \ + show \ + "${@}" +} + # current state of repository gs() { a__git_status "${@}"; } a__git_status() { @@ -525,14 +533,6 @@ a__git_status() { "${@}" } -# show a commit -#( gsc -a__git_show_commit() { - git \ - show \ - "${@}" -} - # tag a commit gt() { a__git_tag "${@}"; } a__git_tag() { diff --git a/sh/main.sh b/sh/main.sh index dc21f3b..ff4c103 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -73,7 +73,7 @@ rwx_cache() { text="$(cat "${path}")" # all source code RWX_CODE="${RWX_CODE}\ -#. ${name} +#↓ ${name} ${text} " } @@ -186,11 +186,13 @@ rwx_parse_code() { } rwx_parse_constants() { printf "%s\n" "${RWX_CODE}" | - sed "/${RWX_REGEX_TARGET_CONSTANT}/s|${RWX_REGEX_TARGET_CONSTANT}|\\1|" + grep "${RWX_REGEX_BEGIN}${RWX_REGEX_CONSTANT}${RWX_REGEX_SET}" | + sed "s|${RWX_REGEX_TARGET_CONSTANT}|\\1|" } rwx_parse_functions() { printf "%s\n" "${RWX_CODE}" | - sed "/${RWX_REGEX_TARGET_FUNCTION}/s|${RWX_REGEX_TARGET_FUNCTION}|\\1|" + grep "${RWX_REGEX_BEGIN}${RWX_REGEX_FUNCTION}${RWX_REGEX_OPEN}" | + sed "s|${RWX_REGEX_TARGET_FUNCTION}|\\1|" } # ╭──────┬─────╮ diff --git a/sh/self.sh b/sh/self.sh index c181112..c214105 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -8,9 +8,9 @@ rwx_doc() { while IFS= read -r line; do case "${line}" in "#!"*) doc="" ;; - "#."*) + "#↓"*) doc="" - module="$(echo "${line}" | sed "s|#\\. \\(.*\\)|\\1|")" + module="$(echo "${line}" | sed "s|#↓ \\(.*\\)|\\1|")" ;; *"#"*) [ -n "${doc}" ] && doc="${doc}