summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-07 13:31:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-07 13:31:11 +0000
commit11ef87461a79877796786af7f0c1eee75ab4f0bf (patch)
tree6b7056dd4f2e68f533085987599ccb15d1204bed /misc
parentff1fb427348e3e19acc324e851a1ad0e49867d0a (diff)
* 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
Diffstat (limited to 'misc')
-rw-r--r--misc/rb_optparse.bash2
-rwxr-xr-xmisc/rb_optparse.zsh2
2 files changed, 2 insertions, 2 deletions
diff --git a/misc/rb_optparse.bash b/misc/rb_optparse.bash
index 5022442c94..8a59ec2dda 100644
--- a/misc/rb_optparse.bash
+++ b/misc/rb_optparse.bash
@@ -11,7 +11,7 @@
# rb_optparse command_using_optparse_2
_rb_optparse() {
- COMPREPLY=($("${COMP_WORDS[0]}" --help=complete="${COMP_WORDS[COMP_CWORD]}"))
+ COMPREPLY=($("${COMP_WORDS[0]}" "--*-completion-bash=${COMP_WORDS[COMP_CWORD]}"))
return 0
}
diff --git a/misc/rb_optparse.zsh b/misc/rb_optparse.zsh
index 28f8ede0fe..bd3fc53b2d 100755
--- a/misc/rb_optparse.zsh
+++ b/misc/rb_optparse.zsh
@@ -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"