KShell Namespace Reference
Provides some basic POSIX shell and bash functionality. More...
| Enumerations | |
| enum | Options { NoOptions = 0, TildeExpand = 1, AbortOnMeta = 2 } | 
| enum | Errors { NoError = 0, BadQuoting, FoundMeta } | 
| Functions | |
| QStringList | splitArgs (const QString &cmd, int flags=0, int *err=0) | 
| QString | joinArgs (const QStringList &args) | 
| QString | joinArgsDQ (const QStringList &args) | 
| QString | joinArgs (const char *const *argv, int argc=-1) | 
| QString | tildeExpand (const QString &path) | 
| QString | homeDir (const QString &user) | 
Detailed Description
Provides some basic POSIX shell and bash functionality.
- See also:
- KStringHandler
Enumeration Type Documentation
| 
 | 
| Flags for splitArgs(). 
 
 | 
| 
 | 
| Status codes from splitArgs(). 
 | 
Function Documentation
| 
 | ||||||||||||||||
| 
Splits  Can optionally perform tilde expansion and/or abort if it finds shell meta characters it cannot process. 
 
 
 Definition at line 65 of file kshell.cpp. References AbortOnMeta, BadQuoting, FoundMeta, homeDir(), QString::isEmpty(), QChar::isSpace(), QString::length(), NoError, TildeExpand, QChar::unicode(), and QString::unicode(). Referenced by KApplication::invokeMailer(). | 
| 
 | 
| 
Quotes and joins  
 
 
 Definition at line 257 of file kshell.cpp. References QString::append(), QString::isEmpty(), and QString::replace(). | 
| 
 | 
| Same as above, but $'' is used instead of '' for the quoting. The output is suitable for splitArgs(), bash, zsh and possibly other bourne-compatible shells, but not for plain sh. The advantage is, that control characters (ASCII less than 32) are escaped into human-readable strings. 
 
 
 Definition at line 311 of file kshell.cpp. References QString::append(), and QString::isEmpty(). | 
| 
 | ||||||||||||
| 
Quotes and joins  
 
 
 Definition at line 283 of file kshell.cpp. References QString::append(), QString::isEmpty(), QString::length(), QString::replace(), and QString::unicode(). | 
| 
 | 
| 
Performs tilde expansion on  Interprets "~/path" and "~user/path". 
 
 
 Definition at line 355 of file kshell.cpp. References QString::find(), homeDir(), QString::isNull(), QString::length(), and QString::unicode(). Referenced by KStandardDirs::addKDEDefaults(). | 
| 
 | 
| 
Obtain a  
 
 
 Definition at line 369 of file kshell.cpp. References QFile::decodeName(), and QString::isEmpty(). Referenced by splitArgs(), and tildeExpand(). | 

