1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/optparse.rb (OptionParser::Officious): separate completion

options from --help.  [ruby-dev:42690]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-12-07 13:31:11 +00:00
parent ff1fb42734
commit 11ef87461a
5 changed files with 26 additions and 15 deletions

View file

@ -16,7 +16,7 @@ generate-complete-function/ruby/optparse ()
{
local cmpl="_${1:t}"
mkdir -p "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}"
$1 --help=zshcomplete="${1:t}" > "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}/$cmpl"
$1 "--*-completion-zsh=${1:t}" > "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}/$cmpl"
if [[ $(type -w "$cmpl") == "${cmpl}: function" ]]; then
unfunction "$cmpl"
autoload -U "$cmpl"