- _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[@]}")
- }
SHARE
TWEET
geirha
a guest
Mar 2nd, 2012
17
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data

