blob: ba043856f84b2403fc72357d4addb85a5cc2063f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
_website_newdoc() { local dir='src' local excl='[._]*' if [[ "$COMP_CWORD" -gt 1 ]]; then dir="${dir}/tags" else excl="@(${excl}|tags)" fi pushd "$dir" >/dev/null COMPREPLY=($(compgen -o filenames -o nospace -d -X "$excl" -- "${COMP_WORDS[COMP_CWORD]}" | sed 's,$,/,')) popd >/dev/null } _website_newtag() { false } complete -o filenames -o nospace -F _website_newdoc ./new-doc complete -o filenames -o nospace -F _website_newtag ./new-tag
|