• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kshell.h
1 /*
2  This file is part of the KDE libraries
3 
4  Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 #ifndef _KSHELL_H
22 #define _KSHELL_H
23 
24 #include <tqstring.h>
25 #include <tqstringlist.h>
26 #include "kdelibs_export.h"
27 
35 namespace KShell {
36 
40  enum Options {
41  NoOptions = 0,
42 
46  TildeExpand = 1,
47 
58  AbortOnMeta = 2
59  };
60 
64  enum Errors {
68  NoError = 0,
69 
73  BadQuoting,
74 
79  FoundMeta
80  };
81 
93  KDECORE_EXPORT TQStringList splitArgs( const TQString &cmd, int flags = 0, int *err = 0 );
94 
101  KDECORE_EXPORT TQString joinArgs( const TQStringList &args );
102 
113  KDECORE_EXPORT TQString joinArgsDQ( const TQStringList &args );
114 
124  KDECORE_EXPORT TQString joinArgs( const char * const *argv, int argc = -1 );
125 
133  KDECORE_EXPORT TQString tildeExpand( const TQString &path );
134 
142  KDECORE_EXPORT TQString homeDir( const TQString &user );
143 
144 }
145 
146 
147 #endif /* _KSHELL_H */
KShell
Provides some basic POSIX shell and bash functionality.
KShell::Options
Options
Flags for splitArgs().
Definition: kshell.h:40
KShell::TildeExpand
@ TildeExpand
Perform tilde expansion.
Definition: kshell.h:46
KShell::AbortOnMeta
@ AbortOnMeta
Bail out if a non-quoting and not quoted shell meta character is encoutered.
Definition: kshell.h:58
KShell::joinArgs
TQString joinArgs(const TQStringList &args)
Quotes and joins args together according to POSIX shell rules.
Definition: kshell.cpp:257
KShell::splitArgs
TQStringList splitArgs(const TQString &cmd, int flags=0, int *err=0)
Splits cmd according to POSIX shell word splitting and quoting rules.
Definition: kshell.cpp:65
KShell::joinArgsDQ
TQString joinArgsDQ(const TQStringList &args)
Same as above, but $'' is used instead of '' for the quoting.
Definition: kshell.cpp:311
KShell::homeDir
TQString homeDir(const TQString &user)
Obtain a user's home directory.
Definition: kshell.cpp:369
KShell::tildeExpand
TQString tildeExpand(const TQString &path)
Performs tilde expansion on path.
Definition: kshell.cpp:355
KShell::Errors
Errors
Status codes from splitArgs()
Definition: kshell.h:64
KShell::BadQuoting
@ BadQuoting
Indicates a parsing error, like an unterminated quoted string.
Definition: kshell.h:73
KShell::FoundMeta
@ FoundMeta
The AbortOnMeta flag was set and a shell meta character was encoutered.
Definition: kshell.h:79
KShell::NoError
@ NoError
Success.
Definition: kshell.h:68

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |