Shell class
Utilities for shell detection and command inspection.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
detectShell(
) → String - Detect the current user's shell.
-
expandVariables(
String text, [Map< String, String> ? env]) → String -
Expand environment variables in
text. -
getPath(
) → List< String> - Get the current PATH as a list of directories.
-
getShellConfig(
) → String - Get the path to the shell configuration file.
-
isCommandSafe(
String command) → bool - Basic safety check for a command string.
-
quoteArg(
String arg) → String - Quote an argument for safe shell inclusion.
-
which(
String command) → Future< String?> -
Find the full path to a command using
which(orwhereon Windows).