Skip to content

usr/ls: filter the listing with a '*' / '?' pattern - #341

Merged
daniel-rossier merged 2 commits into
mainfrom
feat/ls-wildcard
Oct 4, 2026
Merged

daniel-rossier merged 2 commits into
mainfrom
feat/ls-wildcard

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

The SO3 shell does not expand globs, so ls *.c reached ls as a literal name and listed nothing. An argument containing * or ? is now a pattern filtering the entries of DIR (or the single file named).

Checked: clang-format clean; built and run on the host against a test directory (*.c, a?c.txt, no pattern).

The SO3 shell does not expand globs, so `ls *.c` reached ls as a literal
name and listed nothing. An argument containing '*' or '?' is now taken
as a pattern and filters the entries of DIR (or of the single file
named): '*' matches any sequence, '?' one character.

ls [-l] [PATTERN] [DIR]
@daniel-rossier
daniel-rossier merged commit db50880 into main Oct 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant