Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _filedir ()
- {
- local IFS='
- ' xspec;
- _expand || return 0;
- local -a toks;
- local tmp;
- toks=(${toks[@]-} $(
- compgen -d -- "$(quote_readline "$cur")" | {
- while read -r tmp; do
- echo $tmp
- done
- }
- ));
- if [[ "$1" != -d ]]; then
- xspec=${1:+"!*.$1"};
- toks=(${toks[@]-} $(
- compgen -f -X "$xspec" -- "$(quote_readline "$cur")" | {
- while read -r tmp; do
- [ -n $tmp ] && echo $tmp
- done
- }
- ));
- fi;
- COMPREPLY=("${COMPREPLY[@]}" "${toks[@]}")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement