parameters: (s)
return_statement: return (
          s
          if isinstance(s, ShellQuoted)
          else ShellQuoted("'" + str(s).replace("'", "'\\''") + "'")
      )
docstring: Quotes a string if it is not already quoted
docstring_summary: Quotes a string if it is not already quoted
docstring_tokens: Quotes a string if it is not already quoted
function: def shell_quote(s):
      "Quotes a string if it is not already quoted"
      return (
          s
          if isinstance(s, ShellQuoted)
          else ShellQuoted("'" + str(s).replace("'", "'\\''") + "'")
      )
function_tokens: def shell_quote ( s ) : return ( s if isinstance ( s , ShellQuoted ) else ShellQuoted ( "'" + str ( s ) . replace ( "'" , "'\\''" ) + "'" ) )