Comments (5)
Well, the deeper issue is that fd -p -g '*'
doesn't print anything. That's why it never quits, it never even writes anything to the pipe.
from fd.
Oh wait, I guess that's on purpose. *
is only matching a single path component. It works with **
. See #404 (comment) and 47974b6
from fd.
> (fd -gp '**' / | exit)
# exits normally
> (fd -gp '**' / | fzf)
# exits normally
> fd -gp '**' / | fzf
# exits normally
> (fd -gp '/home/me/**' / | exit)
# exits normally
> (fd -gp '/home/me/**' / | fzf)
# blocks
> fd -gp '/home/me/**' / | fzf
# blocks
> (fd -gpHL '/home/me/**' / | exit)
# forks??
> (fd -gpHL '/home/me/**' / | fzf)
# also forks
> fd -gpHL '/home/me/**' / | fzf
# blocks
from fd.
Hmm I'm not sure what you mean by "forks". But as far as I can tell the behaviour of all those commands is within the expected range. fd
will only exit on a closed pipe if it actually tries to write while the pipeline is closed. For something like
> (fd -gp '/home/me/**' / | fzf)
it's quite possible that fd
prints all the matching paths while fzf
is still running, meaning the pipe is open. When you quit fzf
, fd
might still be searching the rest of /
, but it will never print anything again so it will never learn that the pipe is closed.
See #472 for some related discussion about detecting closed pipes.
from fd.
Thank you, I now undestand the problem. I didn't know how terminating the pipe works, my assumption was that a signal is sent when the receiving process exits, not when the sending process tries to write data.
By "forks" I mean fd starts to consume a lot of CPU and the process becomes independent of where I launched it from. I can even close the terminal and it's still running, as can be inspected in a process monitor utility.
from fd.
Related Issues (20)
- Allow `--type dir` as an alias to `directory` due to how common it is
- [BUG] Including hidden files also includes (git)ignored files if the .gitignore is in the parent directory HOT 4
- [BUG] command execution (--exec) not working as expected HOT 3
- Visualize ignore rules in terminal UI with tree structure HOT 4
- [BUG] White-space in folder names causes command to fail HOT 2
- bug(windows): native command execution syntax doesnโt work for npm/npx package HOT 2
- [BUG] `-e` overrides `--no-follow` behavior and includes symlinks into results HOT 1
- More ways to anchor patterns HOT 5
- Please provide a statically linked aarch64 version HOT 5
- [BUG] Installation failed on macOs HOT 3
- [BUG] --list-details fail on windows ( missing ls error ) while using nushell that has ls exposed HOT 1
- [BUG] `--full-path` doesn't interpret with regexp `^` pattern HOT 2
- Shouldn't fd support using ~ as a subtitute for the home directory when writing paths? HOT 1
- List all directories in cwd, including '.' and '..' HOT 2
- Support timestamp in the format @%s (seconds since epoch) like GNU date HOT 1
- fdexclude/exclude configuration file, similar to fdignore/ignore configuration file HOT 2
- Adding an output mode with network-absolute paths HOT 2
- Filter files based on command output HOT 1
- [BUG] Incorrect application of `.gitignore` rules when using `fd` from a nested directory 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 fd.