Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

run-help git subcommand



Hi,

is it possible to lookup the help for “git subcommand” as “run-help
git-subcommand”. My idea was to access the buffer stack in run-help to
get the subcommand but this doesn't work.

[[ $1 == "." ]] && 1="dot"
[[ $1 == ":" ]] && 1="colon"
if [[ $1 == git ]]; then
    local full_cmd
    getln full_cmd
    print -z "$full_cmd"
    i=0
    while [[ $i -lt $#full_cmd ]]; do
        case $full_cmd[$i] in
          -*|git) ;;
          *)
            1=git-"$full_cmd[$i]"
            break
            ;;
        esac
        ((++i))
    done
fi

How can I make ESC-H runs git-subcommand for git subcommand?

Thanks, Jörg.
-- 
Ich halte ihn zwar für einen Schurken und das was er sagt für
falsch – aber ich bin bereit mein Leben dafür einzusetzen, daß
er seine Meinung sagen kann.		(Voletair)



Messages sorted by: Reverse Date, Date, Thread, Author