From 491979b76a9505b098b57fb042a510f9e89feb5b Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 7 May 2022 20:03:48 +0200 Subject: [PATCH] Renaming: Add .sh extension to completion script This doesn't matter if (as currently recommended) the script is placed into a eagerly loaded location (like /etc/bash_completion.d/) - any name will do. However, there's now lazy loading of completion scripts (in /usr/share/bash-completion/completions/), and that only works when the completion script is named exactly like the command the completion is for. As our command is todo.sh (ignoring aliases, which become more complex with lazy loading), the corresponding completion needs to be todo.sh (with the .sh extension) as well. Renaming does not do any harm for our recommended location, but makes it easier for users (and packagers who prepare a todo.sh package) that want to use lazy loading. See https://github.com/todotxt/todo.txt-cli/issues/383 for the complete discussion. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b6056bc..d498004 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ clean: test-pre-clean install: installdirs $(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh - $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo + $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo.sh [ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \ sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config