It seems like app-misc/todo renames the original executable named `todo.sh` and that breaks bash completion for it. Related emerge complaint: * Problems with installed bash completions were found: * * todotxt: incorrect name, no completions for 'todotxt' command defined. * todo.sh: missing alias (symlink) for completed command. * * For more details on installing bash-completions, please see: * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files /usr/share/bash-completion/completions/todo mentions: # If you have renamed the todo.sh executable, or if it is not accessible through # PATH, you need to add and use a wrapper completion function, like this: #_todoElsewhere() #{ # local _todo_sh='/path/to/todo2.sh' # _todo "$@" #} #complete -F _todoElsewhere /path/to/todo2.sh I see a couple of ways from here: Using the original `todo.sh` name could fine too, given that: - it seems like to be the long established standard name for it from upstream - the existing users of todo.txt-cli might already got used to it and/or built their own aliases/settings/etc. based on this name If we insist on changing the name from `todo.sh`, then probably we'd also need to patch the bash completion too in order to reflect the same change. Or the mix of both: install with the original `todo.sh` name, but also install a symlink with the preferred name (`todotxt` currently), and also patch the bash completion to complete both. Though it seems a lot more work than the others :) If given the strategy to follow, I think I can even attach updates here - let me know!
Created attachment 469496 [details] todo-2.10-r1.ebuild Ebuild which: - installs original "binary" name from upstream - symlinks "todotxt" to it - patches bash completion to work with both
Created attachment 469498 [details, diff] todo-2.10-todo_completion.patch Patch bash completion to wokr both with todo.sh and todotxt commands.
@monsieurp: please review attached modifications. I tried to keep current status intact (that is, using a renamed todotxt "binary" in gentoo), but I think upstream's todo.sh alone would do too. Let me know if "only todo.sh" is not a good idea and/or if you would like me to modify the attached patches.
commit 3ab41e097caa4a39f508aee73da35d51bb9d69c4 (HEAD -> master, origin/master, origin/HEAD) Author: Patrice Clement <monsieurp@gentoo.org> AuthorDate: Sat Apr 8 23:56:11 2017 +0200 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: Sat Apr 8 23:56:11 2017 +0200 app-misc/todo: add patch to fix bash completion. Courtesy of Ferenc Erki <erkiferenc@gmail.com>. Gentoo-Bug: https://bugs.gentoo.org/614400 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../todo/files/todo-2.10-fix-bash-completion.patch | 12 ++++++++ app-misc/todo/todo-2.10-r1.ebuild | 35 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app-misc/todo/files/todo-2.10-fix-bash-completion.patch create mode 100644 app-misc/todo/todo-2.10-r1.ebuild Your contribution has been merged. No problem on my end as far as renaming the script goes. It it enables the bash completion script to work, then let's do it. Thanks.