-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Almost expansion globbing #10361
Comments
Can you upgrade your fish installation and try again? I'm not reproducing this on my end, and 3.3.1 is rather old. |
Upgraded to 3.7.0
Can reproduce it with directories at this point.
Just running a small test as follows:
mkdir test
cd test
mkdir ae
ls *e
{nothing}
mkdir be
ls *e
ae:
be:
{as expected}
cd be
touch ae
ls *e
ae
{as expected}
rm ae
mkdir aa
ls *a
{nothing, should be aa, shouldn't it?}
mkdir ba
ls *a
aa:
ba:
{as expected}
So, at this point I am feeling there is something about having a single directory and ls or the * not quite playing well with each other.
Actually, let me just try something... this happens in bash too. I feel like this is just my lack of understanding of how it ought to work rather than it being a bug.
☺☻☺☻☺ ~rts
…On Mar 11 2024, at 10:33 am, Mahmoud Al-Qudsi ***@***.***> wrote:
Can you upgrade your fish installation and try again? I'm not reproducing this on my end, and 3.3.1 is rather old.
—
Reply to this email directly, view it on GitHub ***@***.***/0?redirect=https%3A%2F%2Fgithub.com%2Ffish-shell%2Ffish-shell%2Fissues%2F10361%23issuecomment-1987411146&recipient=cmVwbHkrQkczQjJHSUlPRFNCQlVSMldHS0hYNldEN0laRDVFVkJOSEhJRFVJWFNVQHJlcGx5LmdpdGh1Yi5jb20%3D), or unsubscribe ***@***.***/1?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBG3B2GNDTY6DVZT5KZNTCO3YXT3T5AVCNFSM6AAAAABEPLEGNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGQYTCMJUGY&recipient=cmVwbHkrQkczQjJHSUlPRFNCQlVSMldHS0hYNldEN0laRDVFVkJOSEhJRFVJWFNVQHJlcGx5LmdpdGh1Yi5jb20%3D).
You are receiving this because you authored the thread.
|
This is, in fact, just ls behavior. Try this: ls aa/ This will print nothing. You're asking ls to show you the contents of the "aa/" directory, which is empty. If you do ls aa/ ba/ It will print "aa", and "ba", but more specifically it will print If you want ls to not descend into the directories to show the contents, use |
Indeed! Thank you for the education. Like I said, just my not understanding very well. |
**
Fish version 3.3.1
Linux pop-os 6.6.6
Kitty terminal
So an interesting little problem here, it may, or may not, in fact be a bug, but it feels buggy and perhaps someone can put me on the right track either way:
Just attempting to glob ls with *, just playing around, getting a feel for fish, I notice this: If the directory has a single file ending with an "e" it is not picked up by "ls *e". Add a second file ending in "e", no problem.
For example:
touch charlie
ls *e
{Nothing}
touch charlee
ls *e
charlie
charlee
{As expected}
rm charlee
ls *e
{Again, nothing}
Now I have played around with a few letters, touch aa, ab, ac... etc, just seeing what happens, and assumed I am just globbing wrong. I probably am! But, I would love to know what is special about "e". I didn't go through the alphabet, and searched for other instances of people talking about this, but didn't find anything.
Any thoughts on this would be greatly appreciated. :)
~rts
**
The text was updated successfully, but these errors were encountered: