just do everything i guess

This commit is contained in:
atagen 2026-03-29 16:40:36 +11:00
parent 1e7b7d1614
commit 3ed9fd154f
5 changed files with 251 additions and 13 deletions

View file

@ -1041,7 +1041,10 @@ let find_real_command is_command args =
* this ensures file completions appear with full nushell UX. when the user
* IS typing a flag (partial starts with "-"), we return our flag candidates. *)
let cmd_complete spans user_dir system_dirs mandirs =
let dirs = user_dir :: system_dirs in
(* system dirs are searched first — they're built at index time from
* manpages and are authoritative. user dir is an on-the-fly cache
* that should only be used as fallback for commands not in any system dir. *)
let dirs = system_dirs @ [user_dir] in
(* if the command line starts with a privilege-escalation wrapper, scan past
* it to find the real command. we identify the command by checking the store
* and $PATH this avoids needing per-command option tables which are fragile