diff options
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index c91334d92e..70fda81207 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -763,7 +763,7 @@ XXX to << "#compdef #{name}\n" to << COMPSYS_HEADER visit(:compsys, {}, {}) {|o, d| - to << %Q[ "#{o}[#{d.gsub(/\"/, '\"')}]" \\\n] + to << %Q[ "#{o}[#{d.gsub(/[\"\[\]]/, '\\\\\&')}]" \\\n] } to << " '*:file:_files' && return 0\n" end |