Skip to content

Commit

Permalink
refactor: remove redundant autocomplete subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid committed Oct 13, 2024
1 parent 733d03a commit 23dc3fc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
3 changes: 0 additions & 3 deletions build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,5 @@ fn mangen(out_dir: &Path) -> DynResult {

clap_mangen::generate_to(Cmd::command().name("handlr"), &dest_dir)?;

// Remove hidden subcommand's manpage
remove_file(dest_dir.join("handlr-autocomplete.1"))?;

Ok(())
}
16 changes: 0 additions & 16 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,6 @@ pub enum Cmd {
/// Output mimetype info as json
json: bool,
},

#[clap(hide = true)]
/// Helper subcommand for autocompletion scripts; should be hidden
///
/// This should not be visible in `handlr --help` output, autocompletion, or man pages.
/// If you see this there, please open an issue on GitHub.
///
/// However it is fine if this shows up in the output of `handlr autocomplete --help`.
Autocomplete {
#[clap(short)]
/// Autocomplete for desktop files present on system
desktop_files: bool,
#[clap(short)]
/// Autocomplete for mimetypes/file extensions
mimes: bool,
},
}

#[derive(Clone, Args)]
Expand Down
11 changes: 0 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ fn main() -> Result<()> {
Cmd::List { all, json } => config.print(&mut stdout, all, json),
Cmd::Unset { mime } => config.unset_handler(&mime),
Cmd::Remove { mime, handler } => config.remove_handler(&mime, &handler),
Cmd::Autocomplete {
desktop_files: _,
mimes: _,
} => {
// if desktop_files {
// SystemApps::list_handlers(&mut stdout)?;
// } else if mimes {
// common::db_autocomplete(&mut stdout)?;
// }
Ok(())
}
};

// Issue a notification if handlr is not being run in a terminal
Expand Down

0 comments on commit 23dc3fc

Please sign in to comment.