pub fn shell_kernel_or_cwd(
kernel: Option<String>,
cli_label: &str,
) -> Option<String>Expand description
Default the shell subcommand’s --kernel to the current
directory when it is a kernel source tree.
When kernel is already set the operator’s choice is returned
unchanged. When it is None and the process’s cwd is a kernel
source tree (per is_kernel_source_tree), the cwd is returned as
the kernel spec and an info line naming it is printed. Otherwise
None is returned so resolve_kernel_image falls through to its
cache / auto-download behavior.
Scoped to shell: the test/build/run flows keep their existing
no---kernel defaults. cli_label prefixes the status line
("ktstr" / "cargo ktstr").