18 lines
345 B
Bash
18 lines
345 B
Bash
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
|
|
# ex: ts=8 sw=8 noet filetype=sh
|
|
|
|
# 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
|