summaryrefslogtreecommitdiff
path: root/contrib/pine
diff options
context:
space:
mode:
authorDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
committerDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
commite5a9b6220e93ca656fd9774c6aefa78241edca6f (patch)
tree4a65aa19b18fe2e8dcec24a1c97ce9746a6f91ff /contrib/pine
parent96d00c3d7f1912d4f3f76f8ea21ef68d179b8b30 (diff)
downloadbash-completion-upstream/1.1.tar.gz
Imported Upstream version 1.1upstream/1.1
Diffstat (limited to 'contrib/pine')
-rw-r--r--contrib/pine22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/pine b/contrib/pine
new file mode 100644
index 00000000..0c96bedd
--- /dev/null
+++ b/contrib/pine
@@ -0,0 +1,22 @@
+# PINE address-book completion
+
+have pine &&
+_pineaddr()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook \
+ 2>/dev/null)' -- "$cur" ) )
+} &&
+complete -F _pineaddr $default pine
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh