Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171601700
D31463.id93421.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31463.id93421.diff
View Options
diff --git a/Mk/Uses/completions.mk b/Mk/Uses/completions.mk
new file mode 100644
--- /dev/null
+++ b/Mk/Uses/completions.mk
@@ -0,0 +1,39 @@
+# Helper for programmable shell completions.
+#
+# Feature: completions
+# Usage: USES=completions OR USES=completions:ARGS
+# Valid ARGS: env
+#
+# env Exposes the shell completion variables only and does
+# not create the shell directories automatically.
+#
+# Variables for ports:
+#
+# BASH_COMPDIR Path to the bash completion directory.
+# FISH_COMPDIR Path to the fish completion directory.
+# ZSH_COMPDIR Path to the zsh completion directory.
+#
+# MAINTAINER: ports@FreeBSD.org
+
+.if !defined(_INCLUDE_USES_COMPLETIONS_MK)
+_INCLUDE_USES_COMPLETIONS_MK= yes
+
+_valid_ARGS= env
+. for _arg in ${completions_ARGS}
+. if !${_valid_ARGS:M${_arg}}
+IGNORE= USES=completions: invalid argument: ${_arg}
+. endif
+. endfor
+
+BASH_COMPDIR?= ${PREFIX}/share/bash-completion/completions
+FISH_COMPDIR?= ${PREFIX}/share/fish/vendor_completions.d
+ZSH_COMPDIR?= ${PREFIX}/share/zsh/site-functions
+
+. if empty(completions_ARGS)
+_USES_install+= 501:shell-directories
+shell-directories:
+ @${MKDIR} ${STAGEDIR}${BASH_COMPDIR} \
+ ${STAGEDIR}${FISH_COMPDIR} \
+ ${STAGEDIR}${ZSH_COMPDIR}
+. endif
+.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 13, 1:47 AM (14 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38828701
Default Alt Text
D31463.id93421.diff (1 KB)
Attached To
Mode
D31463: Mk/Uses: Add completions.mk
Attached
Detach File
Event Timeline
Log In to Comment