zshrs 0.13.39

The first JIT-compiled Unix shell — bytecode VM, Cranelift JIT, worker pool, AOP intercept, Rkyv caching
Documentation
//! Port of `_gnu_generic` from `Completion/Unix/Command/_gnu_generic`.
//!
//! Full upstream body (6 lines verbatim):
//! ```text
//! sh:1  #autoload
//! sh:2
//! sh:3  # This is for GNU-like commands which understand the --help option,
//! sh:4  # but which do not otherwise require special completion handling.
//! sh:5
//! sh:6  _arguments '*:arg: _default' --
//! ```

use crate::compsys::ported::_arguments::_arguments;

/// `_gnu_generic` — fallback completer for GNU-style commands.
/// sh:6 — `_arguments '*:arg: _default' --`.
pub fn _gnu_generic() -> i32 {
    let _fn_scope = crate::compsys::ported::shared::FnScope::enter("_gnu_generic");
    _arguments(&["*:arg: _default".to_string(), "--".to_string()])
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn returns_one_without_executor() {
        let _g = crate::test_util::global_state_lock();
        assert_eq!(_gnu_generic(), 1);
    }
}