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 completion for trash-d #99

Closed
wants to merge 20 commits into from
Closed

Conversation

mirsella
Copy link

https://github.com/rushsteve1/trash-d

I don't know if this is feasible since there is already Darwin/command/_trash for another trash command,
but since this one is in Linux/, maybe it can work, as there shouldn't be a system where both Darwin and Linux exist.

thanks !

@danielshahaf
Copy link
Member

danielshahaf commented Jul 11, 2023 via email

@mirsella
Copy link
Author

See ${_comps[watch]} for how to deal with name clashes (two unrelated commands of the same name). Excuse brevity.

thanks l will look into it !

@mirsella
Copy link
Author

i found about _pick_variant.
i'll try to make one _trash completion file, put it in Unix that will manage both trash command on macos and linux, tell me if it's not like that it should be made.

thanks !

not working for now, as the second case for author=steven is never
selectioned
@mirsella
Copy link
Author

mirsella commented Jul 11, 2023

well, i tried, but it's not working for the second case with author=steven. can't test for the macos version.

looking for help !

@mirsella
Copy link
Author

mirsella commented Jul 11, 2023

update: it's working for trash-d, but i can't test for the macos version

Copy link
Contributor

@okdana okdana left a comment

Choose a reason for hiding this comment

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

Didn't test the current function or my suggestions, here's my feedback anyway

Completion/Unix/Command/_trash Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
@mirsella
Copy link
Author

mirsella commented Jul 12, 2023

@okdana thanks for the feedback !
I hope the changes I made were good.

Would be really nice if we manage to make the completion file from the trash (for --delete, --restore) complete from trash --list including the date of deletion, instead of from a folder, so that we can determine which duplicate file name we want in a case where multiple filename-[0-9]{4} exist.

@mirsella mirsella requested a review from okdana July 12, 2023 13:01
Copy link
Contributor

@okdana okdana left a comment

Choose a reason for hiding this comment

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

It looks more like how i'd expect now. A few more things, though, mostly stuff i didn't notice before about how the command works

Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
@mirsella
Copy link
Author

i'll try to use grouping options, but i can't figure it out for now

@mirsella mirsella requested a review from okdana July 15, 2023 20:17
Copy link
Contributor

@okdana okdana left a comment

Choose a reason for hiding this comment

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

One more round, mostly nit-picking, but improving the exclusions on the actions group at least would be nice. Otherwise, i tested both variants, and it seems good

Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
Completion/Unix/Command/_trash Outdated Show resolved Hide resolved
@mirsella
Copy link
Author

I'm not sure about some modifications, sorry if there are still problems.
Thanks for taking the time to improve the design.

@okdana
Copy link
Contributor

okdana commented Jul 16, 2023

Yeah i think it's good. I'll merge this in a day or two if nobody else has anything to say. Thank you

@okdana
Copy link
Contributor

okdana commented Jul 20, 2023

Committed as 5ec4695. Sorry for the delay, thanks again

@okdana okdana closed this Jul 20, 2023
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.

3 participants