original_docstring: Print out instructions for users to initialize shell support.
  
      Arguments:
          cmd (str): the command the user tried to run that requires
              shell support in order to work
          equivalent (str): a command they can run instead, without
              enabling shell support
      
docstring: Print out instructions for users to initialize shell support.
docstring_tokens: Print out instructions for users to initialize shell support .
code: def shell_init_instructions(cmd, equivalent):
      """Print out instructions for users to initialize shell support.
  
      Arguments:
          cmd (str): the command the user tried to run that requires
              shell support in order to work
          equivalent (str): a command they can run instead, without
              enabling shell support
      """
  
      shell_specific = "{sh_arg}" in equivalent
  
      msg = [
          "`%s` requires spack's shell support." % cmd,
          "",
          "To set up shell support, run the command below for your shell.",
          "",
          color.colorize("@*c{For bash/zsh/sh:}"),
          "  . %s/setup-env.sh" % spack.paths.share_path,
          "",
          color.colorize("@*c{For csh/tcsh:}"),
          "  source %s/setup-env.csh" % spack.paths.share_path,
          "",
          color.colorize("@*c{For fish:}"),
          "  source %s/setup-env.fish" % spack.paths.share_path,
          "",
          "Or, if you do not want to use shell support, run " + (
              "one of these" if shell_specific else "this") + " instead:",
          "",
      ]
  
      if shell_specific:
          msg += [
              equivalent.format(sh_arg="--sh  ") + "  # bash/zsh/sh",
              equivalent.format(sh_arg="--csh ") + "  # csh/tcsh",
              equivalent.format(sh_arg="--fish") + "  # fish",
          ]
      else:
          msg += ["  " + equivalent]
  
      msg += ['']
      tty.error(*msg)
code_tokens: def shell_init_instructions ( cmd , equivalent ) : shell_specific = "{sh_arg}" in equivalent msg = [ "`%s` requires spack's shell support." % cmd , "" , "To set up shell support, run the command below for your shell." , "" , color . colorize ( "@*c{For bash/zsh/sh:}" ) , "  . %s/setup-env.sh" % spack . paths . share_path , "" , color . colorize ( "@*c{For csh/tcsh:}" ) , "  source %s/setup-env.csh" % spack . paths . share_path , "" , color . colorize ( "@*c{For fish:}" ) , "  source %s/setup-env.fish" % spack . paths . share_path , "" , "Or, if you do not want to use shell support, run " + ( "one of these" if shell_specific else "this" ) + " instead:" , "" , ] if shell_specific : msg += [ equivalent . format ( sh_arg = "--sh  " ) + "  # bash/zsh/sh" , equivalent . format ( sh_arg = "--csh " ) + "  # csh/tcsh" , equivalent . format ( sh_arg = "--fish" ) + "  # fish" , ] else : msg += [ "  " + equivalent ] msg += [ '' ] tty . error ( * msg )
short_docstring: Print out instructions for users to initialize shell support.
short_docstring_tokens: Print out instructions for users to initialize shell support .
comment: """Print out instructions for users to initialize shell support.
  
      Arguments:
          cmd (str): the command the user tried to run that requires
              shell support in order to work
          equivalent (str): a command they can run instead, without
              enabling shell support
      """