summaryrefslogtreecommitdiff
path: root/misc/rb_optparse.bash
diff options
context:
space:
mode:
Diffstat (limited to 'misc/rb_optparse.bash')
-rw-r--r--misc/rb_optparse.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/misc/rb_optparse.bash b/misc/rb_optparse.bash
new file mode 100644
index 0000000000..f77d937c87
--- /dev/null
+++ b/misc/rb_optparse.bash
@@ -0,0 +1,21 @@
+# -*- bash -*-
+#
+# Completion for bash:
+#
+# (1) install this file,
+#
+# (2) load the script, and
+# . ~/.profile.d/rb_optparse.bash
+#
+# (3) define completions in your .bashrc,
+# rb_optparse command_using_optparse_1
+# rb_optparse command_using_optparse_2
+
+_rb_optparse() {
+ COMPREPLY=($("${COMP_WORDS[0]}" "--*-completion-bash=${COMP_WORDS[COMP_CWORD]}"))
+ return 0
+}
+
+rb_optparse () {
+ [ $# = 0 ] || complete -o default -F _rb_optparse "$@"
+}
over-highlight'> * lib/mkmf.rb (find_executable0): On Windows, it is actually valid to surround individual PATH directory entries with double quotes. Remove these before joining the path as otherwise the literal quotes would become part of the path, resulting in the executable not to be found. [Fix GH-1305] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-03-24test_find_executable.rb: each_extsnobu * test/mkmf/test_find_executable.rb (each_exts): extract common setup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e