complete/zsh: improve --hyperlink-format completion

Also don't re-define helper functions if they exist.

Closes #3102
This commit is contained in:
dana
2025-07-13 01:50:38 -05:00
committed by Andrew Gallant
parent 519c1bd5cf
commit 78383de9b2
5 changed files with 121 additions and 16 deletions

View File

@@ -190,6 +190,7 @@ impl std::fmt::Display for HyperlinkFormat {
#[derive(Clone, Debug)]
pub struct HyperlinkAlias {
name: &'static str,
description: &'static str,
format: &'static str,
display_priority: Option<i16>,
}
@@ -200,6 +201,11 @@ impl HyperlinkAlias {
self.name
}
/// Returns a very short description of this hyperlink alias.
pub const fn description(&self) -> &str {
self.description
}
/// Returns the display priority of this alias.
///
/// If no priority is set, then `None` is returned.