Skip to content

Commit ed3de1b

Browse files
committed
build: 0.1.0
1 parent 1fd0644 commit ed3de1b

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
_basher___cargo_bashman() {
2+
local cur prev opts
3+
COMPREPLY=()
4+
cur="${COMP_WORDS[COMP_CWORD]}"
5+
prev="${COMP_WORDS[COMP_CWORD-1]}"
6+
opts=()
7+
8+
if [[ ! " ${COMP_LINE} " =~ " -h " ]] && [[ ! " ${COMP_LINE} " =~ " --help " ]]; then
9+
opts+=("-h")
10+
opts+=("--help")
11+
fi
12+
if [[ ! " ${COMP_LINE} " =~ " -V " ]] && [[ ! " ${COMP_LINE} " =~ " --version " ]]; then
13+
opts+=("-V")
14+
opts+=("--version")
15+
fi
16+
if [[ ! " ${COMP_LINE} " =~ " -m " ]] && [[ ! " ${COMP_LINE} " =~ " --manifest-path " ]]; then
17+
opts+=("-m")
18+
opts+=("--manifest-path")
19+
fi
20+
21+
opts=" ${opts[@]} "
22+
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
23+
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
24+
return 0
25+
fi
26+
27+
case "${prev}" in
28+
-m|--manifest-path)
29+
COMPREPLY=( $( compgen -f "${cur}" ) )
30+
return 0
31+
;;
32+
*)
33+
COMPREPLY=()
34+
;;
35+
esac
36+
37+
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
38+
return 0
39+
}
40+
complete -F _basher___cargo_bashman -o bashdefault -o default cargo-bashman

release/man1/cargo-bashman.1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.TH "CARGO BASHMAN" "1" "November 2020" "Cargo BashMan v0.1.0" "User Commands"
2+
.SH NAME
3+
Cargo BashMan \- Manual page for cargo\-bashman v0.1.0.
4+
.SH DESCRIPTION
5+
BashMan is a Cargo plugin that helps you generate BASH completions and/or MAN pages for your Rust project.
6+
.SS USAGE:
7+
.TP
8+
cargo\-bashman [FLAGS] [OPTIONS]
9+
.SS FLAGS:
10+
.TP
11+
\fB\-h\fR, \fB\-\-help\fR
12+
Print help information.
13+
.TP
14+
\fB\-V\fR, \fB\-\-version\fR
15+
Print application version.
16+
.SS OPTIONS:
17+
.TP
18+
\fB\-m\fR, \fB\-\-manifest\-path\fR <Cargo.toml>
19+
Path to the Cargo.toml file to use.

0 commit comments

Comments
 (0)