fix: Update build.rs to fix completions

This commit is contained in:
Dheepak Krishnamurthy 2021-11-09 04:07:22 -07:00
parent 4998bd398b
commit 57097d3bec
3 changed files with 9 additions and 13 deletions

View file

@ -11,8 +11,8 @@ fn main() {
let name = app.get_name().to_string();
let outdir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("completions/");
dbg!(&outdir);
generate_to::<Bash, _, _>(&mut app, &name, &outdir).unwrap();
generate_to::<Zsh, _, _>(&mut app, &name, &outdir).unwrap();
generate_to::<Fish, _, _>(&mut app, &name, &outdir).unwrap();
generate_to::<PowerShell, _, _>(&mut app, &name, &outdir).unwrap();
generate_to(Bash, &mut app, &name, &outdir).unwrap();
generate_to(Zsh, &mut app, &name, &outdir).unwrap();
generate_to(Fish, &mut app, &name, &outdir).unwrap();
generate_to(PowerShell, &mut app, &name, &outdir).unwrap();
}

View file

@ -15,16 +15,15 @@ _taskwarrior-tui() {
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-c+[Sets a custom config file]' \
'--config=[Sets a custom config file]' \
'-r+[Sets default report]' \
'--report=[Sets default report]' \
'-c+[Sets a custom config file]:FILE: ' \
'--config=[Sets a custom config file]:FILE: ' \
'-r+[Sets default report]:STRING: ' \
'--report=[Sets default report]:STRING: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
&& ret=0
}
(( $+functions[_taskwarrior-tui_commands] )) ||

View file

@ -12,7 +12,6 @@ _taskwarrior-tui() {
taskwarrior-tui)
cmd="taskwarrior__tui"
;;
*)
;;
esac
@ -26,7 +25,6 @@ _taskwarrior-tui() {
return 0
fi
case "${prev}" in
--config)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -50,7 +48,6 @@ _taskwarrior-tui() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}