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

Issue: Case-Insensitive File Search in Git Repository #109

Open
Ritikasinghpro opened this issue Jun 25, 2024 · 0 comments
Open

Issue: Case-Insensitive File Search in Git Repository #109

Ritikasinghpro opened this issue Jun 25, 2024 · 0 comments

Comments

@Ritikasinghpro
Copy link

Users often encounter difficulties when searching for files within the repository due to case-sensitive filename searches. For example, if a user attempts to find a file named "ReadMe.md" but searches for "README.md", the case sensitivity of the search command will result in a failure to locate the file. This issue can cause unnecessary confusion and hinder productivity.

Example Scenario
Consider the following situation: A user is trying to locate all PNG files in their home directory but forgets the exact casing of the filenames.

Current behavior using find:

$ find /home/user1 -name '*.png'

If the filenames are actually in uppercase (e.g., IMAGE.PNG), the above command will not return any results, leading the user to believe that the files do not exist.

Suggested Improvement
To alleviate this issue, it is recommended to use the -iname option instead of the -name option with the find command. The -iname option performs a case-insensitive search, thereby improving the user experience and ensuring that files are found regardless of their casing.

Recommended Command
Instead of:

$ find /home/user1 -name '.png'
Use:
$ find /home/user1 -iname '
.png'
This command will successfully locate files like image.png, IMAGE.PNG, and Image.PNG, regardless of their case.

image

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

1 participant