# Copyright © 2013 Jani Nikula
#
# Based on the bash-completion package:
-# http://bash-completion.alioth.debian.org/
+# https://github.com/scop/bash-completion
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
;;
*)
- local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date:"
+ local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod:"
compopt -o nospace
COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
;;
if [ -z "${arg}" ]; then
# top level completion
- local top_options="--help --version"
case "${cur}" in
- -*) COMPREPLY=( $(compgen -W "${top_options}" -- ${cur}) ) ;;
- *) COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) ) ;;
+ -*)
+ # XXX: handle ${_notmuch_shared_options} and --config=
+ local options="--help --version"
+ COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
+ ;;
+ *)
+ COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) )
+ ;;
esac
elif [ "${arg}" = "help" ]; then
# handle help command specially due to _notmuch_commands usage