MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / complete_view_names

Function complete_view_names

atomic-cli/src/commands/complete.rs:78–87  ·  view source on GitHub ↗

Dynamic completer for view-name arguments. Runs in the user's CWD during completion; if there is no repository there it returns no candidates rather than erroring.

(current: &OsStr)

Source from the content-addressed store, hash-verified

76/// Runs in the user's CWD during completion; if there is no repository there
77/// it returns no candidates rather than erroring.
78pub(crate) fn complete_view_names(current: &OsStr) -> Vec<CompletionCandidate> {
79 let prefix = current.to_string_lossy();
80 let Ok(repo) = require_repository(None) else {
81 return Vec::new();
82 };
83 view_name_candidates(&repo, &prefix)
84 .into_iter()
85 .map(CompletionCandidate::new)
86 .collect()
87}
88
89/// Dynamic completer for change-hash arguments, annotating each hash with its
90/// commit message as the completion description.

Callers

nothing calls this directly

Calls 3

require_repositoryFunction · 0.85
view_name_candidatesFunction · 0.85
into_iterMethod · 0.45

Tested by

no test coverage detected