# File lib/cgikit/utilities.rb, line 39
  def query_string_from_shell
    require "shellwords"
    msg = %|(offline mode: enter name=value pairs on standard input)\n|
    string = unless ARGV.empty?
               ARGV.join(' ')
             else
               if STDIN.tty?
                 STDERR.print(msg)
               end
               readlines.join(' ').gsub(/\n/n, '')
             end.gsub(/\\=/n, '%3D').gsub(/\\&/n, '%26')
    words = Shellwords.shellwords(string)

    if words.find{|x| /=/n.match(x) }
      words.join('&')
    else
      words.join('+')
    end
  end