From 04b2eba695436285c55fd7ebb2b1edd05a70fc1b Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:59:56 -0400 Subject: [PATCH] docs: Update README to reflect that Bash is working --- README.md | 16 ++++++---------- samples/_test1.bash | 19 ------------------- 2 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 samples/_test1.bash diff --git a/README.md b/README.md index 457976c..264cf6f 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ [![Latest version](https://img.shields.io/crates/v/man-completions.svg)](https://crates.io/crates/man-completions) [![License](https://img.shields.io/crates/l/man-completions.svg)](./LICENSE.md) -This is an unfinished project to parse manpages to get completions for Zsh, Bash, -Nushell, and, in the future, other shells. Bash is still a work in progress. +This is a crate for parsing manpages to get completions for Zsh, Bash, Nushell, +and, in the future, other shells. It also generates JSON files, in case your shell isn't supported, so you can process it and generate completions yourself. +Currently, only a couple kinds of manpages are supported. + Ported from [Fish's completions script](https://github.com/fish-shell/fish-shell/blob/master/share/tools/create_manpage_completions.py) For examples of the kinds of files this generates, look at the [`expected`](./tests/resources/expected/) folder inside the [`tests`](./tests) folder. @@ -55,13 +57,7 @@ so to configure that, set the `RUST_LOG` environment variable (the link has inst Things to do: -- Generate Bash - Port type 3, type 4, darwin, scdoc, and degroff parsers -- Don't generate unnecessary files in tests -- Allow configuring tests more, test .gz, test excluding/including commands, directories, sections - - The `--shells` flag should really be `--shell` because outside of the tests, - no one's going to generate completions for multiple shells at once in the same - directory. -- Speed improvements - the integration tests currently take over a second to run, - and it seems most of that time is spent in parsing +- Ensure nested subcommands and multiple subcommands work +- Test .gz, test excluding/including commands and directories - Figure out why fish only seems to use man1, man6, and man8 diff --git a/samples/_test1.bash b/samples/_test1.bash deleted file mode 100644 index b0fde00..0000000 --- a/samples/_test1.bash +++ /dev/null @@ -1,19 +0,0 @@ -# #!/usr/bin/env bash - -TODO this is not how it should be generated - -# function _comp_cmd_test1 { -# COMPREPLY=() -# case ${COMP_CWORD} in -# 1) -# COMPREPLY=($(compgen -W '-h --help -v --verbose --loud sub1' -- $2));; -# 2) -# case $3 in -# 'sub1') -# COMPREPLY=($(compgen -W '--foobar' -- $2));; -# esac;; -# esac -# return 0 -# } - -# complete -F _comp_cmd_test1 test1