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

Add directories list #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nomasprime
Copy link
Contributor

No description provided.

@nomasprime nomasprime force-pushed the add-directories-list branch 3 times, most recently from 415d314 to 0e5aee0 Compare February 16, 2021 13:43
@nomasprime
Copy link
Contributor Author

Should mention I've only tested this with ripgrep.


class Task extends FilesTask {
protected post_process_hook(process: ChildProcess) {
let post_process = spawn('sh', ['-c', 'xargs -I {} gdirname {} | sort | uniq'])
Copy link
Contributor

@kidonng kidonng May 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use sort --unique instead of sort | uniq. But isn't there better ways than spawning another shell?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kidonng. I've noticed it's very slow on larger projects. Hopefully I'll have time to improve it soon.

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

Successfully merging this pull request may close these issues.

2 participants