Skip to contentSkip to conversation

xl: use proper name for bash_completion file

PATCH In review Olaf Hering 3 participants 3 messages Oct 20, 2020 – Jan 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: use proper name for bash_completion file

Files in the bash-completion dirs should be named like the commands, without suffix. Without this change 'xl' will not be recognized as a command with completion support if BASH_COMPLETION_DIR is set to /usr/share/bash-completion/completions.

Fixes commit 9136a919b19929ecb242ef327053d55d824397df

---
 tools/xl/Makefile        | 4 ++--
 tools/xl/bash-completion | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/xl/Makefile +2 -2
index bdf67c8464..656b21c7da 100644
@@ -45,11 +45,11 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
-	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl
 
 .PHONY: uninstall
 uninstall:
-	rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+	rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/xl
 	rm -f $(DESTDIR)$(sbindir)/xl
 
 .PHONY: clean
tools/xl/bash-completion +1 -1
index b7cd6b3992..7c6ed32f88 100644
@@ -1,4 +1,4 @@
-# Copy this file to /etc/bash_completion.d/xl.sh
+# Copy this file to /etc/bash_completion.d/xl
 
 _xl()
 {
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Olaf Hering

Files in the bash-completion dirs should be named like the commands, without suffix. Without this change 'xl' will not be recognized as a command with completion support if BASH_COMPLETION_DIR is set to /usr/share/bash-completion/completions.

Fixes commit 9136a919b19929ecb242ef327053d55d824397df

This obviously fell through the cracks, but definitely matches how systems are typically set up.

Quoted 34 lines
---
 tools/xl/Makefile        | 4 ++--
 tools/xl/bash-completion | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/xl/Makefile +2 -2
index bdf67c8464..656b21c7da 100644
@@ -45,11 +45,11 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
-	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl
 
 .PHONY: uninstall
 uninstall:
-	rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+	rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/xl
 	rm -f $(DESTDIR)$(sbindir)/xl
 
 .PHONY: clean
tools/xl/bash-completion +1 -1
index b7cd6b3992..7c6ed32f88 100644
@@ -1,4 +1,4 @@
-# Copy this file to /etc/bash_completion.d/xl.sh
+# Copy this file to /etc/bash_completion.d/xl
 
 _xl()
 {
#2 lore raw

Andrew Cooper writes ("Re: [PATCH v1] xl: use proper name for bash_completion file"):

Quoted 6 lines · Olaf Hering
Quoted 5 lines

Files in the bash-completion dirs should be named like the commands, without suffix. Without this change 'xl' will not be recognized as a command with completion support if BASH_COMPLETION_DIR is set to /usr/share/bash-completion/completions.

Quoted 8 lines
Quoted 3 lines

Fixes commit 9136a919b19929ecb242ef327053d55d824397df

This obviously fell through the cracks, but definitely matches how systems are typically set up.

Technically speaking this might need a release-ack as it's enabling a feature that was previously defeated by a bug. I think it's fine at this stage, so:

Ian.