# HG changeset patch # User Oleksandr Gavenko # Date 1410308251 -10800 # Node ID 4a77587b061786a285d2f5b83f12732596b0857b # Parent e1347fd8085386ae899154ad991270a4c18cdb5d Completion for mypath Bash helper. diff -r e1347fd80853 -r 4a77587b0617 .bashrc --- a/.bashrc Wed Sep 10 03:04:57 2014 +0300 +++ b/.bashrc Wed Sep 10 03:17:31 2014 +0300 @@ -124,6 +124,12 @@ fi done } +_mypath() { + if [[ $COMP_CWORD = 2 ]]; then + COMPREPLY=( $(compgen -v -- "${COMP_WORDS[2]}") ) + fi +} +complete -F _mypath mypath # LANG=C for speed. alias grep='GREP_COLOR="31;47" LANG=C grep -n --color=auto'