aisk / pick

create curses based interactive selection list in the terminal
MIT License
721 stars 60 forks source link

Add excluded indexes. #105

Closed J3ldo closed 3 weeks ago

J3ldo commented 1 year ago

Added excluded indexes, excluded indexes are put in as a list and will be skipper over when tried to select. An user may need this for file selection to make the directories unselectable.

Code added:

while self.index in self.excluded_indexes:
    self.index -= 1  # - for move_down, and + for move_up
J3ldo commented 1 year ago

Also in issue #29

wong2 commented 4 months ago

I think it's better to add it as an attribute of Option

iamalisalehi commented 1 month ago

Hi @aisk , It seems like the person who originally opened this PR, isn't interested anymore. Are you planning on fixing and merging it?

aisk commented 1 month ago

@iamalisalehi This change looks almost good to me with what you pointed out. But some work can't be done just by clicking the submit button in your reviews above, like adding a field to the Options class.

So I think we need to create a new PR to continue the work. And if you are interested in it, you can just do it, but one thing to note is that, if you want to use the code in this PR, it should keep the commits in this PR, or add the original author to the co-author field in commit messages, to appreciate their contributions.