5 ms·
you can report issues in the github repo. However, if you want to ignore files and folders you need to pass those patterns to the function. For example, you wan
by ahmadassaf 10y ago
you can report issues in the github repo. However, if you want to ignore files and folders you need to pass those patterns to the function. For example, you want to exclude .git and .png then you need to run the command:
notes -x *.git/ -x *.png
in general if you want to exclude hidden files and folders you need to run it with -h true which excludes hidden dirs and files, so you can run
notes -h true -x *.png
- Retr0spectrum 10y agoType \* to get *.
- ahmadassaf 10y agoah sweet ! thanks will update now
- ahmadassaf 10y agostill not luck with me .. weird
- deleted 10y ago[deleted]
- StreakyCobra 10y agoIt would be so much nicer to define better defaults. Like what… 99.99% of the users are never, ever, wanting to see notes that are in the `.git` repository, nor in PNG or any other images. Even hidden dirs and files should not be searched by default I think. All this will cause nightmares to users before they start using it, like the first-poster of this thread had. Provide better defaults, make it vcs-aware (ignored files, etc…) and you will have a much more appreciated product! It is for the same reason that `rg`/`ag`/`pt` are used nowadays instead of `grep`. 99.99% of the time, you don't want to search files that are ignored by your VCS, and you want to search recursively, and also probably in a case-insensitive way. For `grep` you have to fight with tons of options to filter out files, to enable recursivity and to ignore case. With `ag`? just `ag whatever`. Defaults make the difference.
- ahmadassaf 10y agoi actually ignore a bunch of file extensions const BAD_EXTENSIONS = ["!*.jpg", "!*.jpeg", "!*.mov", "!*.mp3", "!*.gif", "!*.png", "!*.log", "!*.bin", "!*.psd", "!*.swf", "!*.fla", "!*.ico"]; I was wondering why `.png` was scanned. However, your comment makes so much sense and it will be wise to add default folders like .git as well Thanks a lot for that, ill be looking forward to what defaults people also want to have :)
- StreakyCobra 10y agoGlad to hear my comment inspired you :-) Good luck with this! PS: Another idea: Instead of selecting manually what extensions should be used or not, you may want to try being more general, like enabling by default all text-like files, and disabling all data-like files. Maybe with `file --mime` then looking at charset value: test.jpg: image/jpeg; charset=binary manage.py: text/x-python; charset=us-ascii
- kirubakaran 10y agoIf you prefix those lines with 4 spaces, it will be interpreted as code, instead of the asterisk being interpreted as <strong> Example: rm -rf *
- wjdp 10y agoThere should be the option for an include pattern. I wanted to only check *.py files, this is very cumbersome to do with only excludes.
- ahmadassaf 10y agointeresting .. will try and fix that. Thanks for the pointer
- ahmadassaf 10y agojust realised a fix where you can now: notes -i *.py I hope this helps :)
- wjdp 10y agoFab, cheers
- smarx007 10y agoWell, you've disabled issues on the repo, that's why I ask.
- ahmadassaf 10y agomy bad .. did not know they were disabled