Package ghidra.pty

Class ShellUtils

java.lang.Object
ghidra.pty.ShellUtils

public class ShellUtils extends Object
  • Constructor Details

    • ShellUtils

      public ShellUtils()
  • Method Details

    • parseArgs

      public static List<String> parseArgs(String args)
      Parse a command line into an argument list

      LATER: This is meant to mimic UNIX- / C-style arguments, but that's probably not appropriate on all systems. We should either:

      1. Let the offer specify how @args ought to be treated.
      2. Let the header annotations for @args include some extra specifier.
      Parameters:
      args - the arguments as a single string
      Returns:
      the list of split arguments
    • removePath

      public static String removePath(String exec)
    • removePath

      public static List<String> removePath(List<String> args)
    • generateLine

      public static String generateLine(List<String> args, ShellUtils.Shell shell)
    • generateEnvBlock

      public static String generateEnvBlock(Map<String,String> env)