Added -j flag to 'complete' for completing job names/pids

This commit is contained in:
2026-02-27 11:03:56 -05:00
parent e141e39c7e
commit c508180228
44 changed files with 3259 additions and 2853 deletions

View File

@@ -1,12 +1,12 @@
use crate::{
builtin::setup_builtin,
expand::expand_prompt,
getopt::{get_opts_from_tokens, Opt, OptSpec},
getopt::{Opt, OptSpec, get_opts_from_tokens},
jobs::JobBldr,
libsh::error::{ShErr, ShErrKind, ShResult, ShResultExt},
parse::{NdRule, Node},
prelude::*,
procio::{borrow_fd, IoStack},
procio::{IoStack, borrow_fd},
state,
};
@@ -30,7 +30,7 @@ pub const ECHO_OPTS: [OptSpec; 4] = [
];
bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EchoFlags: u32 {
const NO_NEWLINE = 0b000001;
const USE_STDERR = 0b000010;
@@ -59,7 +59,6 @@ pub fn echo(node: Node, io_stack: &mut IoStack, job: &mut JobBldr) -> ShResult<(
borrow_fd(STDOUT_FILENO)
};
let mut echo_output = prepare_echo_args(
argv
.into_iter()
@@ -197,7 +196,6 @@ pub fn prepare_echo_args(
prepared_args.push(prepared_arg);
}
Ok(prepared_args)
}