Skip to content

Commit b14c2c6

Browse files
committed
Escape backslashes
1 parent 434e92f commit b14c2c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/optparse.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def compsys(to, name = File.basename($0)) # :nodoc:
10331033
to << "#compdef #{name}\n"
10341034
to << COMPSYS_HEADER
10351035
visit(:compsys, {}, {}) {|o, d|
1036-
to << %Q[ "#{o}[#{d.gsub(/[\"\[\]]/, '\\\\\&')}]" \\\n]
1036+
to << %Q[ "#{o}[#{d.gsub(/[\\\"\[\]]/, '\\\\\&')}]" \\\n]
10371037
}
10381038
to << " '*:file:_files' && return 0\n"
10391039
end

0 commit comments

Comments
 (0)