Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Ronan Pigott <rpigott314@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Ronan Pigott <rpigott@berkeley.edu>
Subject: [PATCH BlueZ v2 4/4] build: install zsh completions
Date: Fri, 16 Aug 2019 23:34:52 -0700
Message-ID: <20190817063452.23273-5-rpigott@berkeley.edu> (raw)
In-Reply-To: <20190817063452.23273-1-rpigott@berkeley.edu>

From: Ronan Pigott <rpigott@berkeley.edu>

---
 Makefile.tools |  5 +++++
 configure.ac   | 12 ++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/Makefile.tools b/Makefile.tools
index b6b99d216..81ed2e30d 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -12,6 +12,11 @@ client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
 				$(GLIB_LIBS) $(DBUS_LIBS) -lreadline
 endif
 
+if ZSH_COMPLETIONS
+zshcompletiondir=$(ZSH_COMPLETIONDIR)
+dist_zshcompletion_DATA = completion/zsh/_bluetoothctl
+endif
+
 if MONITOR
 bin_PROGRAMS += monitor/btmon
 
diff --git a/configure.ac b/configure.ac
index 0afe1e6db..76612ff07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,18 @@ if (test -z "${path_dbussessionbusdir}"); then
 fi
 AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
 
+AC_ARG_WITH([zsh-completion-dir], AC_HELP_STRING([--with-zsh-completion-dir=DIR],
+				[path to install zsh completions]),
+					[path_zshcompletiondir=${withval}],
+						[path_zshcompletiondir="yes"])
+
+if (test "${path_zshcompletiondir}" = "yes"); then
+	path_zshcompletiondir="$datarootdir/zsh/site-functions"
+	AC_MSG_RESULT([${path_zshcompletiondir}])
+fi
+AC_SUBST(ZSH_COMPLETIONDIR, [${path_zshcompletiondir}])
+AM_CONDITIONAL(ZSH_COMPLETIONS, test "${path_zshcompletiondir}" != "no")
+
 AC_ARG_ENABLE(backtrace, AC_HELP_STRING([--enable-backtrace],
 		[compile backtrace support]), [enable_backtrace=${enableval}])
 
-- 
2.22.1


  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-17  6:34 [PATCH BlueZ v2 0/4] Add zsh completions for bluetoothctl Ronan Pigott
2019-08-17  6:34 ` [PATCH BlueZ v2 1/4] client/main: add help option for available args Ronan Pigott
2019-08-17  6:34 ` [PATCH BlueZ v2 2/4] shared/shell: add --zsh-complete option Ronan Pigott
2019-08-17  6:34 ` [PATCH BlueZ v2 3/4] completion: add bluetoothctl zsh completions Ronan Pigott
2019-08-18  0:57   ` Ronan Pigott
2019-08-17  6:34 ` Ronan Pigott [this message]
2019-09-06  8:13 ` [PATCH BlueZ v2 0/4] Add zsh completions for bluetoothctl Luiz Augusto von Dentz

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190817063452.23273-5-rpigott@berkeley.edu \
    --to=rpigott314@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=rpigott@berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git