Skip to content

Add directories list#114

Open
nomasprime wants to merge 1 commit intoneoclide:masterfrom
nomasprime:add-directories-list
Open

Add directories list#114
nomasprime wants to merge 1 commit intoneoclide:masterfrom
nomasprime:add-directories-list

Conversation

@nomasprime
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Should mention I've only tested this with ripgrep.

Comment thread src/directories.ts

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