My bash shell has started acting weirdly when using wildcards. Tab-completions work and, if I type the file name in, it also works. But, if I use a wildcard, it does not work, as per the below transcript:

[~/myDir] ls JourneyManager.cpp 
[~/myDir] ls JourneyManager.*
ls: cannot access 'JourneyManager.*': No such file or directory

I've examined the ls output and confirmed the file name is as expected, no weird character or anything. It's in a git repo but I don't think that's the issue since copies of the files in my home directory also have the same problem.

  • 3
    What is the output of echo $-? does it include f? Apr 7, 2020 at 3:01

1 Answer 1


Usually, this resolves the issue:

set +f


Probably you should check the contents of your system and user profiles. There is a good article for this https://www.tecmint.com/understanding-shell-initialization-files-and-user-profiles-linux/

  • Ah, I think I figured out what happened, I have a vague recollection of doing set -f sometime yesterday to try get a list of functions.I should have use declare.
    – olbaidxap
    Apr 7, 2020 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.