diff --git a/src/app/mod.rs b/src/app/mod.rs index c2131679b86..3c7553444e8 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1081,9 +1081,11 @@ impl<'a, 'b> App<'a, 'b> { /// env!("OUT_DIR")); // Then say where write the completions to /// } /// ``` - /// Now, once we combile there will be a `bash.sh` file in the directory. Assuming we compiled - /// with debug mode, it would be somewhere similar to - /// `/target/debug/build/myapp-/out/myapp_bash.sh` + /// Now, once we combile there will be a `{bin_name}.bash-completion` file in the directory. + /// Assuming we compiled with debug mode, it would be somewhere similar to + /// `/target/debug/build/myapp-/out/myapp.bash-completion`. + /// + /// Fish shell completions will use the file format `{bin_name}.fish` pub fn gen_completions, S: Into>(&mut self, bin_name: S, for_shell: Shell, out_dir: T) { self.p.meta.bin_name = Some(bin_name.into()); self.p.gen_completions(for_shell, out_dir.into()); diff --git a/src/app/parser.rs b/src/app/parser.rs index 2930534663b..9e6c5966d43 100644 --- a/src/app/parser.rs +++ b/src/app/parser.rs @@ -114,7 +114,7 @@ impl<'a, 'b> Parser<'a, 'b> let out_dir = PathBuf::from(od); let suffix = match for_shell { - Shell::Bash => "_bash.sh", + Shell::Bash => ".bash-completion", Shell::Fish => ".fish", };