Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying regex that external command output must match #54

Open
adaszko opened this issue Sep 15, 2024 · 0 comments
Open

Allow specifying regex that external command output must match #54

adaszko opened this issue Sep 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@adaszko
Copy link
Owner

adaszko commented Sep 15, 2024

If we had a way to specify that <FS@fish> ::= {{{ string split ' ' --fields 3 </proc/mounts | sort --unique }}} always matches \w+, it would be possible to complete <FS>[,<FS>]....

Working version syntax:

duf -hide-fs <FS>[,<FS>]...;
<FS@fish> ::= {{{ string split ' ' --fields 3 </proc/mounts | sort --unique }}}(fish="\w+");

Such mechanism would relax the biggest restriction of current grammars -- that an external command has to occur only at a tail position.

There is no common syntax for regexes across all shells, so shell-specific ones are used instead.

Inspired by #53.

@adaszko adaszko added the enhancement New feature or request label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant