Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bash autocompletion

  • Loading branch information...
commit 219d7ccd35cfe3d1138c77e058802e786e83c6fa 1 parent 4d0c167
Victor Engmark authored
Showing with 15 additions and 0 deletions.
  1. +1 −0  Makefile
  2. +14 −0 etc/bash_completion.d/vcard
1  Makefile
View
@@ -40,6 +40,7 @@ clean: distclean
.PHONY: install
install:
$(SETUP) install $(INSTALL_OPTIONS)
+ install --mode 644 etc/bash_completion.d/$(notdir $(CURDIR)) /etc/bash_completion.d/
.PHONY: register
register:
14 etc/bash_completion.d/vcard
View
@@ -0,0 +1,14 @@
+# Autocomplete for filterous command
+_vcard()
+{
+ local cur prev opts base
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ # Basic options
+ opts="-v --verbose"
+
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+}
+complete -o filenames -o default -F _vcard vcard
Please sign in to comment.
Something went wrong with that request. Please try again.