Comments (7)
ag -l -g ""
only returns the list of files, not including directories. That was the main reason why CTRL-T was coded to use find command. So this leaves me with a question. I agree that making the command configurable is preferable, but should we use the same FZF_DEFAULT_COMMAND for CTRL-T as well? Should we introduce another env variable? At first I assumed that a user would edit fzf.bash or zsh file after the installation (e.g. use different key binding, CTRL-XT instead of CTRL-T, etc.), but I guess very few actually do that. What do you think we should do about this?
from fzf.
Simply put, the problem is the inconsistency between fzf
command and CTRL-T
key binding:
- fzf w/o FZF_DEFAULT_COMMAND: list of files
- CTRL-T: list of files and directories
from fzf.
At first I assumed that a user would edit fzf.bash or zsh file after the installation
Yes, this is what I ended up doing. :-)
That said, you're right, after filing this issue I realized that ag only lists files, and not directories. That doesn't seem ideal.
Here is an issue for adding that to ag:
ggreer/the_silver_searcher#215
But the ag issue tracker is pretty full, so I don't get the impression it will be implemented anytime soon.
Perhaps the easiest thing for now would be to explicitly document that FZF_DEFAULT_COMMAND only applies to explicit fzf invocations, and not to Ctrl-T, due to this ag issue.
That is too bad though, as ag respecting .gitignore/etc. is awfully useful.
from fzf.
I've checked other similar projects, ack and pt, but they all show the same behavior, which is quite understandable since their main responsibility is to search for pattern in file contents and not to display the list of files and directories. I actually found something relevant called friendly-find but unfortunately it seems to be much slower than vanilla find. I'll let you know if I find a better alternative.
And I updated the doc to encourage customization of the generated scripts.
from fzf.
You might want to check out this small wrapper script I wrote which extends the output of ag -g ""
to print the directories as well. The overhead is negligible.
from fzf.
It'd be awesome if you added documentation for this variable at https://github.com/junegunn/fzf/blob/master/README.md#respecting-gitignore-hgignore-and-svnignore
Didn't realize this was a feature until I found this issue.
from fzf.
@jez Will do, thanks.
from fzf.
Related Issues (20)
- Re-evaluate --bind each time bindkey pressed HOT 1
- Select candidate if it's multi lines? HOT 1
- Option to show --marker and --marker-multi-line if it's multi lines? HOT 1
- Constraint to only exit fzf if processes base on key press are done? HOT 6
- History search not working HOT 7
- fzf executing before sudo prompts for password HOT 1
- How to restore old execute behavior? (so it doesn't output to /dev/tty) HOT 2
- [Feature] Enhance ctrl-t behaviour
- `--bind=… execute` works differently in 0.53.0, breaks functionality HOT 1
- Repository tag name HOT 1
- Allow filtering on un-rendered fields. HOT 2
- Cygwin reports ps: unknown option -- o for wildcard completion
- Winget: latest version is v0.54.0 instead of 0.54.0 HOT 3
- Commit 83b60339 broke use of pbogut/fzf-mru.vim plugin HOT 6
- arrow up keybinding is showing no scrollable list HOT 11
- unknown option --no-tmux error HOT 1
- consider adding `--head` option? HOT 1
- Security Alert: Potential Trojan Detected in Windows Release v0.54.1 HOT 5
- [Feature Request] Line numbers for selectable results HOT 4
- Fzf 0.54.1 mac arm64 release contains a `._fzf` file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.