Add completion for 'pathsearch'.
--- a/.bashrc Tue Oct 25 18:04:59 2011 +0300
+++ b/.bashrc Tue Oct 25 21:52:44 2011 +0300
@@ -209,3 +209,18 @@
}
complete -F _hgsyncew -o nospace hgsyncew
+_pathsearch() {
+ local prev cur=${COMP_WORDS[$COMP_CWORD]}
+ [[ $COMP_CWORD > 0 ]] && prev=${COMP_WORDS[(($COMP_CWORD-1))]}
+ if [[ $prev = -d ]]; then
+ COMPREPLY=()
+ return 0
+ fi
+ case "$cur" in
+ -*) COMPREPLY=( $(compgen -W "-d --delimiter= -h --help" -- $cur ) ) ;;
+ *) COMPREPLY=() ;;
+ esac
+ return 0
+}
+complete -F _pathsearch -o nospace pathsearch
+