Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rsync --progress stops completion



On Sep 21,  6:43pm, Yuri D'Elia wrote:
}
} _complete_failed()
} {
}   if [[ $LASTWIDGET = *complete* && -z $_complete_failed_active ]]
}   then
}     local _complete_failed_active=1
}     [[ $compstate[context] = command && CURRENT -gt 2 ]] || return 1
}     words=("$words[1]" "${(@)words[CURRENT,-1]}")
}     CURRENT=2
}     _compskip=default
}     _normal -s
}   fi
} }
} 
} Now, this only offers the fallback if we attempt completion *twice*, so
} it's somewhat in the middle.

I don't think you need the _complete_failed_active test -- _normal will
not re-enter the list of completers, things would somehow have to get
all the way around to _main_complete again for that.

To permit zstyle customizations it might also be useful to set up the
"compcontext" parameter and call _complete instead of "_normal -s".
There aren't any good examples of this except Functions/Misc/nslookup.



Messages sorted by: Reverse Date, Date, Thread, Author