Skip to main content

printf

Function printf 

Source
pub fn printf<'a>(
    pattern: &str,
    delimiter: &Regex,
    replstr: &str,
    selected: &(impl Iterator<Item = &'a MatchedItem> + Clone),
    current: &Option<MatchedItem>,
    query: &str,
    command_query: &str,
    quote_args: bool,
) -> String
Expand description

Replace the fields in pattern with the items, expanding {…} patterns

Replaces:

  • {} -> currently selected item
  • {1..} etc -> fields of currently selected item, whose index is selected
  • {+} -> all selected items (multi-select)
  • {q} -> current query
  • {cq} -> current command query