UnknownShell class
Used by dcli to interacte with the shell environment when we are unable to detect what shell is active. This may simply be the parent process of the dart app so not a shell at all.
- Implemented types
Constructors
- UnknownShell.withPid(int? pid, {String? processName})
- Attached to the Unknown shell with the given pid.
Properties
- canModifyPath → bool
-
Returns true if this shell supports
modifying the shell's PATH
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasStartScript → bool
-
True if this shell supports a start script or configuration file.
e.g. a script that is run by the shell or a configuration file
that is read when the shell starts.
no setteroverride
- installInstructions → String
-
Returns instructions on how to install DCli.
no setteroverride
- isCompletionInstalled → bool
-
no setteroverride
- isCompletionSupported → bool
-
no setteroverride
- isPrivilegedPasswordRequired → bool
-
Throws UnimplementedError.
@Throwing(UnimplementedError)
no setteroverride
- isPrivilegedProcess → bool
-
Throws UnimplementedError.
@Throwing(UnimplementedError)
no setteroverride
- isPrivilegedUser → bool
-
Returns true if the current user this process
is running as has esclated privileges.
no setteroverride
- isSudo → bool
-
Throws UnimplementedError.
@Throwing(UnimplementedError)
no setteroverride
- loggedInUser → String?
-
Returns the username of the logged in user.
no setteroverride
- name → String
-
The name of the shell
e.g. bash
no setteroverride
- pathToStartScript → String
-
Throws Type.
@Throwing(Type)
no setteroverride
- pid → int?
-
The pid of the current shell
final
- processName → String?
-
The name of the shell process.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startScriptName → String
-
Throws Type.
@Throwing(Type)
no setteroverride
Methods
-
addFileAssocation(
String dcliPath) → void -
Called during the install so that an OS that needs
to create a file association between .dart and dcli
can create that association.
The implementor is responsible for not adding
the association if it already exists.
override
-
appendPathToMacOsPathd(
String path) → bool - @Throwing(ArgumentError)
-
appendToPATH(
String path) → bool -
@Throwing(ArgumentError)
override
-
checkInstallPreconditions(
) → String? -
Some OS/Shell combinations have some preconditions that must
be met before dcli can be installed.
override
-
install(
{bool installDart = false, bool activate = true}) → Future< bool> -
Throws UnsupportedError.
@Throwing(UnsupportedError)
override
-
installTabCompletion(
{bool quiet = false}) → void -
Throws UnimplementedError.
@Throwing(UnimplementedError)
override
-
matchByName(
String name) → bool -
Returns true if the shells name matches
the passed
name. The comparison is case insensitive.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prependToPATH(
String path) → bool -
@Throwing(ArgumentError)
override
-
privilegesRequiredMessage(
String app) → String -
Returns a message informing the user that they need to run
as a priviledged user to run an app.
override
-
releasePrivileges(
) → void -
On Linux and MacOS systems makes the script run as
a non-privileged user even when started with sudo.
override
-
restorePrivileges(
) → void -
If releasePrivileges has been called
then this method will restore those privileges
See
override
-
toString(
) → String -
A string representation of this object.
inherited
-
withPrivileges(
RunPrivileged action, {bool allowUnprivileged = false}) → void -
When a script is run under sudo on Linux and MacOS and you
have previously called releasePrivileges then this method
will run
actionwith root privileges.override -
withPrivilegesAsync(
RunPrivilegedAsync action, {bool allowUnprivileged = false}) → Future< void> -
Identical to withPrivileges but allows you to run an
async action.
override
Operators
-
operator ==(
covariant UnknownShell other) → bool -
The equality operator.
override