Skip to content

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