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

Completion for ls #3

Open
NV opened this issue Mar 14, 2010 · 1 comment
Open

Completion for ls #3

NV opened this issue Mar 14, 2010 · 1 comment

Comments

@NV
Copy link

NV commented Mar 14, 2010

How ls.usage should look like?

$ man ls
SYNOPSIS
    ls [-ABCFGHLPRTWZabcdefghiklmnopqrstuwx1] [file ...]

$ echo "ls [-ABCFGHLPRTWZabcdefghiklmnopqrstuwx1] [file ...]" > ~/.compleat/ls.usage
$ exec bash
$ ls -↹
$ ls -ABCFGHLPRTWZabcdefghiklmnopqrstuwx1

( is a tab key)

This is not what I'm expecting. Ok, another try:

$ echo "ls [-(A|B|C|F|G|H|L|P|R|T|W|Z|a|b|c|d|e|f|g|h|i|k|l|m|n|o|p|q|r|s|t|u|w|x|1)] [<file> ...]" > ~/.compleat/ls.usage
$ exec bash
$ ls ↹
$ ls - 

Instead of file listing - added.

$ ls - ↹
1   B   F   H   P   T   Z   b   d   f   h   k   m   o   q   s   u   x   
A   C   G   L   R   W   a   c   e   g   i   l   n   p   r   t   w

Space after - should not exist.

BTW, the idea of compleat is really elegant. I like it.

@mbrubeck
Copy link
Owner

Thanks for the report! Strings in Compleat usage files right now are always treated as whole words/tokens. There's no way yet to do regexp-style patterns within a word. So unfortunately you need to do something this:

ls [-A|-B|-C|-F] ...

I'll see if I can solve this, either in a general way, or with a specific syntax for short (single-letter) options.

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