summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--contrib/bash-completion9
2 files changed, 7 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index ac3037f3..c1f0e186 100644
--- a/Makefile
+++ b/Makefile
@@ -64,9 +64,10 @@ install-data: all
for file in $(EXTENSIONDIR)/*; do \
install -m 644 $$file $(DESTDIR)$(DATADIR)/$(REAL_NAME)/$$file; \
done
-ifdef bashcompletion
- install -d $(DESTDIR)/$(bashcompletion)
- install -m 644 $(CONTRIBDIR)/bash-completion $(DESTDIR)/$(bashcompletion)/dwb
+ifdef BASHCOMPLETION
+ install -d $(DESTDIR)/$(BASHCOMPLETION)
+ install -m 644 $(CONTRIBDIR)/bash-completion $(DESTDIR)/$(BASHCOMPLETION)/dwb
+ ln -s $(BASHCOMPLETION)/dwb $(DESTDIR)$(BASHCOMPLETION)/dwbem
endif
@@ -84,8 +85,9 @@ uninstall-data:
$(RM) -r $(DESTDIR)$(DATADIR)/$(REAL_NAME)
$(RM) -r $(DESTDIR)$(DATADIR)/applications/dwb.desktop
$(RM) -r $(DESTDIR)$(DATADIR)/pixmaps/dwb.png
-ifdef bashcompletion
- $(RM) $(DESTDIR)$(bashcompletion)/dwb
+ifdef BASHCOMPLETION
+ $(RM) $(DESTDIR)$(BASHCOMPLETION)/dwb
+ unlink $(DESTDIR)$(BASHCOMPLETION)/dwbem
endif
distclean: clean
diff --git a/contrib/bash-completion b/contrib/bash-completion
index 89d45bfe..7debbb64 100644
--- a/contrib/bash-completion
+++ b/contrib/bash-completion
@@ -83,10 +83,6 @@ _dwb() {
local cur prev opts lopts
_init_completion || return
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
-
opts="-h -c -e -f -l -n -r -R -p -x -v -S"
lopts="--help --check-script --embed --force --list-sessions --new-instance
--restore --override-restore --profile --execute --version --enable-scripts"
@@ -124,10 +120,6 @@ _dwbem() {
local cur prev opts lopts
_init_completion || return
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
-
opts="-h -a -b -B -c -d -e -E -i -I -l -L -n -N -r -p -u -U"
lopts="--help --list-all --bind --setbind --config --disable --enable --edit
--install --info --list-installed --setload --no-config --no-confirm
@@ -154,7 +146,6 @@ _dwbem() {
return 0
}
-
case "${cur}" in
--*)
COMPREPLY=( $( compgen -W "${lopts}" -- $cur ) )