Optionally disable ignore patterns for some functions. #369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw that ivy-ignore-buffers was added, which is a neat feature. I remember using the feature back when I used ido :-)
This patch adds the ability to optionally disable user-configured filtering at the command invocation. The convention is that if called with a non-nil prefix arg, then user-filtering is turned off. I added this to the new buffer filtering and
counsel-find-file
as well.Example usage would look similar to:
C-xb - ivy-switch-buffer with ivy-ignore-buffers filtering
C-uC-xb - ivy-switch-buffer, no filtering
C-xC-f - counsel-find-file with counsel-find-file-ignore-regexp filtering
C-uC-xC-f - counsel-find-file, no filtering
One thing you might want to change in the patch is that I used
current-prefix-arg
directly rather than(interactive "P")
because this would change the positional arguments incounsel-find-file
and break any users' scripts that are using it with an initial-input.If that's not really a concern then it would be better to use
(interactive "P")
, and make the prefix arg a normal optional argument and easier to use programatically.