Namespace KShell |
|
|
\namespace KShell Provides some basic POSIX shell and bash functionality. See also KStringHandler |
|
Quotes and joins args together according to POSIX shell rules.
args - a list of strings to quote and join Returns a command suitable for shell execution |
|
|
Quotes arg according to POSIX shell rules. This function can be used to quote an argument string such that the shell processes it properly. This is e.g. necessary for user-provided file names which may contain spaces or quotes. It also prevents expansion of wild cards and environment variables.
arg - the argument to quote Returns the quoted argument |
|
Splits cmd according to POSIX shell word splitting and quoting rules. Can optionally perform tilde expansion and/or abort if it finds shell meta characters it cannot process.
cmd - the command to split flags - operation flags, see Options err - if not 0, a status code will be stored at the pointer target, see Errors Returns a list of unquoted words or an empty list if an error occurred |
|
Performs tilde expansion on path. Interprets "~/path" and "~user/path". If the path starts with "\~" (i.e., an escaped tilde), the backslash is removed and the path is returned as is.
path - the path to tilde-expand Returns the expanded path |