1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Port of `_first` from `Completion/Zsh/Context/_first`.
//!
//! Full upstream body (47 lines, all comments — the function is
//! deliberately empty so users can override it as a hook):
//! ```text
//! sh: 1 #compdef -first-
//! sh: 2
//! sh: 3 # This function is called at the very beginning before any other
//! sh: 4 # function for a specific context.
//! sh: 5 #
//! sh: 6 # This just gives some examples of things you might want to do here.
//! sh: 7 # …
//! sh:47 # fi
//! ```
//!
//! The shell function ships as 47 lines of `#`-prefixed example code
//! showing what users CAN put in their own override of `_first`. The
//! upstream function itself executes nothing — it's a no-op hook
//! invoked at the start of every completion context.
//!
//! Faithful Rust port: a no-op returning 0 (success — the shell's
//! default exit when an empty function runs).
/// `_first` — `-first-` context hook. No-op by default; users override
/// for per-context pre-completion behavior.