mirror of
https://github.com/Savapitech/42sh.git
synced 2026-03-18 21:50:35 +01:00
Add ? [ ] in globbing
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include "path.h"
|
||||
#include "u_mem.h"
|
||||
#include "u_str.h"
|
||||
#include "alias.h"
|
||||
|
||||
const builtins_funcs_t BUILTINS[] = {
|
||||
{ "builtins", &builtins_builtins },
|
||||
|
||||
@@ -48,7 +48,7 @@ bool process_args(ast_t *node, args_t *args, size_t *toks_i, ef_t *ef)
|
||||
{
|
||||
token_t tok = node->vector.tokens[*toks_i];
|
||||
|
||||
if (strchr(tok.str, '*') != NULL)
|
||||
if (strcspn(tok.str, "*[]?") != strlen(tok.str))
|
||||
return (process_globbing(tok.str, args));
|
||||
if (!ensure_args_capacity(args))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user