-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
plustik
committed
Nov 10, 2023
1 parent
7375f7a
commit 08de951
Showing
6 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use clap::CommandFactory; | ||
use clap_complete::{generate, Shell}; | ||
|
||
use crate::cli; | ||
|
||
pub fn generate_completion_file(shell: Shell) -> std::io::Result<()> { | ||
let mut cmd = cli::Opt::command(); | ||
let bin_name = cmd.get_bin_name().unwrap_or(cmd.get_name()).to_string(); | ||
generate(shell, &mut cmd, bin_name, &mut std::io::stdout()); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod diff; | ||
pub mod generate_completion; | ||
pub mod list_syntax_themes; | ||
pub mod parse_ansi; | ||
mod sample_diff; | ||
|