diff --git a/.rusty-hook.toml b/.rusty-hook.toml new file mode 100644 index 0000000..95a7235 --- /dev/null +++ b/.rusty-hook.toml @@ -0,0 +1,5 @@ +[hooks] +pre-commit = "cargo build" + +[logging] +verbose = true diff --git a/Cargo.lock b/Cargo.lock index cd9cb79..13ed4ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,6 +63,14 @@ name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ci_info" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "envmnt 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "clap" version = "2.33.1" @@ -112,6 +120,28 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "envmnt" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fsio 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fsio" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "getrandom" version = "0.1.14" @@ -122,6 +152,14 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hashbrown" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hermit-abi" version = "0.1.14" @@ -130,6 +168,15 @@ dependencies = [ "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "indexmap" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "json" version = "0.11.15" @@ -146,11 +193,17 @@ version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "pm" -version = "0.3.4" +name = "nias" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "project-manager" +version = "0.3.5" dependencies = [ "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", "json 0.11.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rusty-hook 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", "spinners 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -185,6 +238,22 @@ dependencies = [ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rusty-hook" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ci_info 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "nias 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "spinner" version = "0.5.0" @@ -259,6 +328,14 @@ dependencies = [ "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-width" version = "0.1.8" @@ -314,20 +391,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum ci_info 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e" "checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" "checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" "checksum dirs-sys 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" +"checksum envmnt 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" +"checksum fsio 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" +"checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum hashbrown 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" "checksum hermit-abi 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" +"checksum indexmap 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7" "checksum json 0.11.15 (registry+https://github.com/rust-lang/crates.io-index)" = "92c245af8786f6ac35f95ca14feca9119e71339aaab41e878e7cdd655c97e9e5" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)" = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" +"checksum nias 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" "checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +"checksum rusty-hook 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3" +"checksum serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" "checksum spinner 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3a7cd01625b7e43e62815677d692cb59b221c2fdc2853d1eb86a260ee0c272" "checksum spinners 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e26e56abcec96e1336be97bb1953153f80e050ff0f86d67721127d30391b6472" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" @@ -337,6 +423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum term 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c0863a3345e70f61d613eab32ee046ccd1bcc5f9105fe402c61fcd0c13eeb8b5" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" "checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" diff --git a/Cargo.toml b/Cargo.toml index 9bdc5f1..d5d1c36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,17 @@ [package] -name = "pm" -version = "0.3.4" +name = "project-manager" +version = "0.3.5" authors = ["Tom McKernan "] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +build = "build.rs" + +[build-dependencies] +clap = {version = "~2.33.0", features = ["yaml", "color"]} + +[dev-dependencies] +rusty-hook = "^0.11.2" [dependencies] clap = {version = "~2.33.0", features = ["yaml", "color"]} diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..aacd02d --- /dev/null +++ b/build.rs @@ -0,0 +1,17 @@ +#[macro_use] +extern crate clap; + +use clap::{Shell, App, AppSettings}; + +fn main() { + let yaml = load_yaml!("src/cli.yml"); + let mut app = App::from_yaml(yaml) + .setting(AppSettings::ArgRequiredElseHelp); + app.gen_completions("project-manager", + Shell::Bash, + "completions/"); + app.gen_completions("project-manager", + Shell::Zsh, + "completions/"); +} + diff --git a/completions/_project-manager b/completions/_project-manager new file mode 100644 index 0000000..b37300f --- /dev/null +++ b/completions/_project-manager @@ -0,0 +1,201 @@ +#compdef project-manager + +autoload -U is-at-least + +_project-manager() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +":: :_project-manager_commands" \ +"*::: :->Project Manager" \ +&& ret=0 + case $state in + (Project Manager) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:project-manager-command-$line[1]:" + case $line[1] in + (clone) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':LINK -- The repo to clone:_files' \ +&& ret=0 +;; +(pull) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'::PROJ_NAME -- The name of the project:_files' \ +&& ret=0 +;; +(ls) +_arguments "${_arguments_options[@]}" \ +'-p[lists just the projects by name with no directories]' \ +'--plain[lists just the projects by name with no directories]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +&& ret=0 +;; +(add) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':PATH -- The directory of the git repo to add:_files' \ +&& ret=0 +;; +(rm) +_arguments "${_arguments_options[@]}" \ +'-d[delete the directory specified]' \ +'--remove-dir[delete the directory specified]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':PROJ_NAME -- The name of the project to delete:_files' \ +&& ret=0 +;; +(cmd) +_arguments "${_arguments_options[@]}" \ +'-d[disables the output of the command]' \ +'--disable-output[disables the output of the command]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':PROJ_NAME -- The name of the project:_files' \ +':CMD_NAME -- name of the command to run:_files' \ +&& ret=0 +;; +(cmds) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':PROJ_NAME -- The name of the project:_files' \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'::PROJ_NAME -- The name of the project:_files' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +&& ret=0 +;; + esac + ;; +esac +} + +(( $+functions[_project-manager_commands] )) || +_project-manager_commands() { + local commands; commands=( + "clone:Clone repository to default directory" \ +"pull:Pulls the specific repo by name. No name pulls all repos" \ +"ls:list all of the directories managed by global git" \ +"add:Add a directory to the list maintained by global-git" \ +"rm:remove the repo from the list maintained by global git" \ +"cmd:runs given command in project directory. If command doesn't exist you will be prompted for it." \ +"cmds:Lists commands for a given project" \ +"status:Displays the status of specified repo if none is provided, displays all" \ +"help:Prints this message or the help of the given subcommand(s)" \ + ) + _describe -t commands 'project-manager commands' commands "$@" +} +(( $+functions[_project-manager__add_commands] )) || +_project-manager__add_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager add commands' commands "$@" +} +(( $+functions[_project-manager__clone_commands] )) || +_project-manager__clone_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager clone commands' commands "$@" +} +(( $+functions[_project-manager__cmd_commands] )) || +_project-manager__cmd_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager cmd commands' commands "$@" +} +(( $+functions[_project-manager__cmds_commands] )) || +_project-manager__cmds_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager cmds commands' commands "$@" +} +(( $+functions[_project-manager__help_commands] )) || +_project-manager__help_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager help commands' commands "$@" +} +(( $+functions[_project-manager__ls_commands] )) || +_project-manager__ls_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager ls commands' commands "$@" +} +(( $+functions[_project-manager__pull_commands] )) || +_project-manager__pull_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager pull commands' commands "$@" +} +(( $+functions[_project-manager__rm_commands] )) || +_project-manager__rm_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager rm commands' commands "$@" +} +(( $+functions[_project-manager__status_commands] )) || +_project-manager__status_commands() { + local commands; commands=( + + ) + _describe -t commands 'project-manager status commands' commands "$@" +} + +_project-manager "$@" \ No newline at end of file diff --git a/completions/project-manager.bash b/completions/project-manager.bash new file mode 100644 index 0000000..e9b36a6 --- /dev/null +++ b/completions/project-manager.bash @@ -0,0 +1,203 @@ +_project-manager() { + local i cur prev opts cmds + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + cmd="" + opts="" + + for i in ${COMP_WORDS[@]} + do + case "${i}" in + project-manager) + cmd="project-manager" + ;; + + add) + cmd+="__add" + ;; + clone) + cmd+="__clone" + ;; + cmd) + cmd+="__cmd" + ;; + cmds) + cmd+="__cmds" + ;; + help) + cmd+="__help" + ;; + ls) + cmd+="__ls" + ;; + pull) + cmd+="__pull" + ;; + rm) + cmd+="__rm" + ;; + status) + cmd+="__status" + ;; + *) + ;; + esac + done + + case "${cmd}" in + project-manager) + opts=" -h -V --help --version clone pull ls add rm cmd cmds status help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + + project__manager__add) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__clone) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__cmd) + opts=" -d -h -V --disable-output --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__cmds) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__help) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__ls) + opts=" -p -h -V --plain --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__pull) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__rm) + opts=" -d -h -V --remove-dir --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + project__manager__status) + opts=" -h -V --help --version " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +complete -F _project-manager -o bashdefault -o default project-manager diff --git a/src/cli.yml b/src/cli.yml index 0bc01dd..b8a314d 100644 --- a/src/cli.yml +++ b/src/cli.yml @@ -1,5 +1,5 @@ name: Project Manager -version: 0.3.4 +version: 0.3.5 author: Tom McKernan about: A project manager for your computer subcommands: