diff options
author | Nico Wagner <niko2342@users.noreply.github.com> | 2016-11-05 09:42:08 +0100 |
---|---|---|
committer | Sascha Grunert <mail@saschagrunert.de> | 2016-11-05 09:42:08 +0100 |
commit | 5eff9de3e2f4f284a5dc41e3d4f7a038832c66b0 (patch) | |
tree | 88240d393899802a88de1f3e16d74aa18856c98a | |
parent | 22dc7a651682620167a4f6c0e62ff37bc9bdd6e7 (diff) |
Added zsh completion
-rw-r--r-- | Cargo.lock | 63 | ||||
-rw-r--r-- | _git-journal | 235 | ||||
-rw-r--r-- | src/main.rs | 4 |
3 files changed, 271 insertions, 31 deletions
@@ -3,13 +3,13 @@ name = "git-journal" version = "1.0.1" dependencies = [ "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.17.1 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.77 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -44,7 +44,7 @@ dependencies = [ [[package]] name = "clap" -version = "2.16.1" +version = "2.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -60,7 +60,7 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", @@ -68,7 +68,7 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", @@ -109,7 +109,7 @@ dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -117,7 +117,7 @@ name = "idna" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -146,8 +146,8 @@ name = "libgit2-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "libssh2-sys 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", @@ -169,7 +169,7 @@ name = "libssh2-sys" version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -193,7 +193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "matches" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -210,7 +210,7 @@ version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.77 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -247,7 +247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "0.2.13" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -288,29 +288,30 @@ dependencies = [ [[package]] name = "rayon" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -390,7 +391,7 @@ name = "unicode-bidi" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -410,11 +411,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "url" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -456,9 +457,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00" -"checksum clap 2.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7d3f517329dfa6300c8415693c54e524f777dc470265bd73dfd1ff1699c3ee30" -"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978" -"checksum curl-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ae8698d4d2bc4b8182a11f4a5298fa03d2127c29e95dbae538d0cf003141818" +"checksum clap 2.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27dac76762fb56019b04aed3ccb43a770a18f80f9c2eb62ee1a18d9fb4ea2430" +"checksum cmake 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0e5bcf27e097a184c1df4437654ed98df3d7a516e8508a6ba45d8b092bbdf283" +"checksum curl-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4f198d10378a3bc1f1b0e3bc3a2de5c9bb9e08938460dec57ba6667d9a65fbc3" "checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf" "checksum gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "553f11439bdefe755bf366b264820f1da70f3aaf3924e594b886beb9c831bcf5" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" @@ -472,21 +473,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libssh2-sys 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "1debd7e56d19655eb786f827675dc55f6d530de6d7b81e76d13d1afc635d6c07" "checksum libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "40f2df7730b5d29426c3e44ce4d088d8c5def6471c2c93ba98585b89fb201ce6" "checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" -"checksum matches 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc3ad8109fa4b522f9b0cd81440422781f564aaf8c195de6b9d6642177ad0dd" +"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" "checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" "checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce" "checksum num 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "bde7c03b09e7c6a301ee81f6ddf66d7a28ec305699e3d3b056d2fc56470e3120" "checksum num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "fb24d9bfb3f222010df27995441ded1e954f8f69cd35021f6bef02ca9552fb92" "checksum num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "287a1c9969a847055e1122ec0ea7a5c5d6f72aad97934e131c83d5c08ab4e45c" "checksum num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a16a42856a256b39c6d3484f097f6713e14feacd9bfb02290917904fae46c81c" -"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" +"checksum num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8890e6084723d57d0df8d2720b0d60c6ee67d6c93e7169630e4371e88765dcad" "checksum openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)" = "89c47ee94c352eea9ddaf8e364be7f978a3bb6d66d73176572484238dd5a5c3f" "checksum pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8cee804ecc7eaf201a4a207241472cc870e825206f6c031e3ee2a72fa425f2fa" "checksum pnacl-build-helper 1.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "61c9231d31aea845007443d62fcbb58bb6949ab9c18081ee1e09920e0cf1118b" "checksum rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2791d88c6defac799c3f20d74f094ca33b9332612d9aef9078519c82e4fe04a5" -"checksum rayon 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "655df67c314c30fa3055a365eae276eb88aa4f3413a352a1ab32c1320eda41ea" -"checksum regex 0.1.77 (registry+https://github.com/rust-lang/crates.io-index)" = "64b03446c466d35b42f2a8b203c8e03ed8b91c0f17b56e1f84f7210a257aa665" -"checksum regex-syntax 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "48f0573bcee95a48da786f8823465b5f2a1fae288a55407aca991e5b3e0eae11" +"checksum rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b6a6e05e0e6b703e9f2ad266eb63f3712e693a17a2702b95a23de14ce8defa9" +"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" +"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" "checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" "checksum strsim 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50c069df92e4b01425a8bf3576d5d417943a6a7272fbabaf5bd80b1aaa76442e" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" @@ -500,7 +501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" "checksum unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b905d0fc2a1f0befd86b0e72e31d1787944efef9d38b9358a9e92a69757f7e3b" "checksum unicode-width 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6722facc10989f63ee0e20a83cd4e1714a9ae11529403ac7e0afd069abc39e" -"checksum url 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba5a45db1d2e0effb7a1c00cc73ffc63a973da8c7d1fcd5b46f24285ade6c54" +"checksum url 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "48ccf7bd87a81b769cf84ad556e034541fb90e1cd6d4bc375c822ed9500cd9d7" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" "checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f" diff --git a/_git-journal b/_git-journal new file mode 100644 index 0000000..1b97dd2 --- /dev/null +++ b/_git-journal @@ -0,0 +1,235 @@ +#compdef git-journal + +_git-journal() { + typeset -A opt_args + local ret=1 + + local context curcontext="$curcontext" state line + _arguments -s -S -C \ +"-p+[Sets a custom working path.]" \ +"--path+[Sets a custom working path.]" \ +"-n+[The number of tags until the parser stops when a single revision is given.]" \ +"--tags-count+[The number of tags until the parser stops when a single revision is given.]" \ +"-e+[A pattern to exclude git tags from the processing.]" \ +"-t+[Use a custom output template.]" \ +"--template+[Use a custom output template.]" \ +"-o+[The output file for the changelog.]" \ +"--output+[The output file for the changelog.]" \ +"-a[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \ +"--all[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \ +"-g[Generate a fresh output template from a commit range.]" \ +"--generate[Generate a fresh output template from a commit range.]" \ +"-s[Print only the shortlog (summary) form.]" \ +"--short[Print only the shortlog (summary) form.]" \ +"-u[Skip entries without any relation to a git TAG.]" \ +"--skip-unreleased[Skip entries without any relation to a git TAG.]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"1:: :_git-journal_commands" \ +"*:: :->git-journal" \ +&& ret=0 + case $state in + (git-journal) + curcontext="${curcontext%:*:*}:git-journal-command-$words[1]:" + case $line[1] in + (p) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"1:: :_git-journal_prepare_commands" \ +&& ret=0 +;; +(prepare) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"1:: :_git-journal_prepare_commands" \ +&& ret=0 +;; +(s) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +&& ret=0 +;; +(setup) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +&& ret=0 +;; +(v) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"1:: :_git-journal_verify_commands" \ +&& ret=0 +;; +(verify) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"1:: :_git-journal_verify_commands" \ +&& ret=0 +;; +(help) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +&& ret=0 +;; +(help) +_arguments -s -S -C \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +"-h[Prints help information]" \ +"--help[Prints help information]" \ +"-V[Prints version information]" \ +"--version[Prints version information]" \ +&& ret=0 +;; + esac + ;; +esac +} + +(( $+functions[_git-journal_commands] )) || +_git-journal_commands() { + local commands; commands=( + "prepare:Prepare a commit message before the user can edit it." \ +"p:Prepare a commit message before the user can edit it." \ +"setup:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \ +"s:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \ +"verify:Verify the specified commit message." \ +"v:Verify the specified commit message." \ +"help:Prints this message or the help of the given subcommand(s)" \ +"help:Prints this message or the help of the given subcommand(s)" \ +"REVISION_RANGE:Specifies the revision range to be processed. If a single revision is specified, the output will stop at the first following git TAG." \ + ) + _describe -t commands 'git-journal commands' commands "$@" +} +(( $+functions[_git-journal_help_commands] )) || +_git-journal_help_commands() { + local commands; commands=( + + ) + _describe -t commands 'git-journal help commands' commands "$@" +} +(( $+functions[_git-journal_p_commands] )) || +_git-journal_p_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ +"TYPE:The type of the commit. For example "message"." \ + ) + _describe -t commands 'git-journal p commands' commands "$@" +} +(( $+functions[_p_commands] )) || +_p_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ +"TYPE:The type of the commit. For example "message"." \ + ) + _describe -t commands 'p commands' commands "$@" +} +(( $+functions[_git-journal_prepare_commands] )) || +_git-journal_prepare_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ +"TYPE:The type of the commit. For example "message"." \ + ) + _describe -t commands 'git-journal prepare commands' commands "$@" +} +(( $+functions[_git-journal_s_commands] )) || +_git-journal_s_commands() { + local commands; commands=( + + ) + _describe -t commands 'git-journal s commands' commands "$@" +} +(( $+functions[_s_commands] )) || +_s_commands() { + local commands; commands=( + + ) + _describe -t commands 's commands' commands "$@" +} +(( $+functions[_git-journal_setup_commands] )) || +_git-journal_setup_commands() { + local commands; commands=( + + ) + _describe -t commands 'git-journal setup commands' commands "$@" +} +(( $+functions[_git-journal_v_commands] )) || +_git-journal_v_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ + ) + _describe -t commands 'git-journal v commands' commands "$@" +} +(( $+functions[_v_commands] )) || +_v_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ + ) + _describe -t commands 'v commands' commands "$@" +} +(( $+functions[_git-journal_verify_commands] )) || +_git-journal_verify_commands() { + local commands; commands=( + "MESSAGE:The path to the commit message which should be prepared." \ + ) + _describe -t commands 'git-journal verify commands' commands "$@" +} + +_git-journal "$@"
\ No newline at end of file diff --git a/src/main.rs b/src/main.rs index aca5b56..67a33cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,6 +101,10 @@ fn run() -> Result<(), Error> { app.gen_completions("git-journal", Shell::Fish, path); info!("Installed fish completions to the current path."); } + if is_program_in_path("zsh") { + app.gen_completions("git-journal", Shell::Zsh, path); + info!("Installed zsh completions to the current path."); + } } Some("verify") => { // Verify a commit message |