Skip to content

Commit

Permalink
Update git-req-completion.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
luxrck committed Nov 4, 2019
1 parent 618f6cd commit 757d74d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ fn set_args(mut p: Manual, y: &Yaml) -> Manual {
p
}

fn generate_manpage(yml: &Yaml, trg_dir: &String) -> std::io::Result<()> {
let out_location = Path::new(&trg_dir)
.join(&env::var("PROFILE").unwrap())
.join("git-req.man");
fn generate_manpage(yml: &Yaml, trg_dir: &Path) -> std::io::Result<()> {
let out_location = trg_dir.join("git-req.man");

let page = Manual::new("git-req").about(yml["about"].as_str().unwrap());
let page = set_authors(page);
Expand All @@ -94,6 +92,7 @@ fn main() -> std::io::Result<()> {
Ok(s) => s,
Err(_) => String::from("target"),
};
let trg_dir = Path::new(&trg_dir).join(&env::var("PROFILE").unwrap());

let yml = YamlLoader::load_from_str(include_str!("cli-flags.yml")).unwrap();
let yml = yml.get(0).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion git-req-completion.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_git_req() {
local cur
_init_completion || return
COMPREPLY=( $(compgen -W '-l --list --set-project-id --clear-project-id --set-domain-key --clear-domain-key' -- "$cur") )
COMPREPLY=( $(compgen -W '-l --list --set-project-id --clear-project-id --set-domain-key --clear-domain-key -u --use-remote' -- "$cur") )
} &&
complete -F _git_req git-req

0 comments on commit 757d74d

Please sign in to comment.