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

Why prefix and not exact-match? #22

Closed
digikar99 opened this issue May 22, 2020 · 2 comments
Closed

Why prefix and not exact-match? #22

digikar99 opened this issue May 22, 2020 · 2 comments

Comments

@digikar99
Copy link

(let ((matches (remove-if-not #'prefix-p *options* :key key)))

Either my knowledge of unix is wrong, or this is a bug: why are we using prefix rather than exact-match? ls --al rather than ls --all clearly gets me an error on linux.

digikar99 added a commit to digikar99/unix-opts that referenced this issue May 22, 2020
digikar99 added a commit to digikar99/unix-opts that referenced this issue May 22, 2020
@digikar99
Copy link
Author

TIL

$ ls --al
ls: option '--al' is ambiguous; possibilities: '--all' '--almost-all'
Try 'ls --help' for more information.
$ ls --alm
CHANGELOG.md  example  .gitignore  README.md   .travis.yml    unix-opts.lisp
.directory    .git     LICENSE.md  tests.lisp  unix-opts.asd
$ ls --all
.   CHANGELOG.md  example  .gitignore  README.md   .travis.yml    unix-opts.lisp
..  .directory    .git     LICENSE.md  tests.lisp  unix-opts.asd

@vindarel
Copy link
Contributor

+1 thanks for the example

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

No branches or pull requests

2 participants