I've added code that only activated entries show when disable is selected. Reproducible: Always Steps to Reproduce: Edit the file: /usr/share/bash-completion/eselect From: 3) case $2 in set|enable|disable) possibles=$(eselect "$1" list 2>/dev/null \ | sed -n -e "${sedcmd3}") ;; esac ;; esac To: 3) case $2 in set|enable) possibles=$(eselect "$1" list 2>/dev/null \ | sed -n -e "${sedcmd3}") ;; disable) possibles=$(eselect "$1" list | grep "*" 2>/dev/null \ | sed -n -e "${sedcmd3}") ;; esac ;; esac Actual Results: Only activated objects will be shown Expected Results: It show all possibly completions
Is there a specific reason why the solution isn't symmetric? I.e., why shouldn't it suppress activated entries for the "enable" action, too? Also I have some doubts if other users wouldn't see such a change as over-engineering.
(In reply to comment #1) > Is there a specific reason why the solution isn't symmetric? I.e., why > shouldn't it suppress activated entries for the "enable" action, too? > > Also I have some doubts if other users wouldn't see such a change as > over-engineering. > Yeah that's a problem but, can you explain me why the program should display all the possible services? And that without any highlight if a service is enabled or not? Ok, you can say, you can filter the active services with: eselect bashcomp list (--global)|grep "*" And the question is, why should i do that, when the tool can make this for me? Why two steps when one is sufficiently? And the one million dollar question is: why should that be over-engeenered???
Thanks for the patch and prototype, the only hint for next time is to attach your diffs as reading them on the screen can be bothersome. FWIW, I'm not the maintainer of this package but I do help with bash-completion. I've seen the number of completion modules grow with time as upstream is very active. Now it is over 200 but I, personally, only have 5 enabled on my system and think this change would be beneficial to users in my situation and seen as an improvement.
Still waiting for an answer to my earlier question: (In reply to comment #1) > Is there a specific reason why the solution isn't symmetric? I.e., why > shouldn't it suppress activated entries for the "enable" action, too?