Implemented -o opt for complete/compgen builtins
Completion candidates now come with a space by default, unless it's a directory
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::{
|
||||
libsh::term::{Style, Styled},
|
||||
parse::lex::Span,
|
||||
prelude::*,
|
||||
getopt::Opt, libsh::term::{Style, Styled}, parse::lex::Span, prelude::*
|
||||
};
|
||||
|
||||
pub type ShResult<T> = Result<T, ShErr>;
|
||||
@@ -395,6 +393,7 @@ impl From<Errno> for ShErr {
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ShErrKind {
|
||||
IoErr(io::ErrorKind),
|
||||
InvalidOpt,
|
||||
SyntaxErr,
|
||||
ParseErr,
|
||||
InternalErr,
|
||||
@@ -421,6 +420,7 @@ impl Display for ShErrKind {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let output = match self {
|
||||
Self::IoErr(e) => &format!("I/O Error: {e}"),
|
||||
Self::InvalidOpt => &format!("Invalid option"),
|
||||
Self::SyntaxErr => "Syntax Error",
|
||||
Self::ParseErr => "Parse Error",
|
||||
Self::InternalErr => "Internal Error",
|
||||
|
||||
Reference in New Issue
Block a user