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

tdecore

  • tdecore
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 "tdelibs_export.h"
27
35namespace 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 TDECORE_EXPORT TQStringList splitArgs( const TQString &cmd, int flags = 0, int *err = 0 );
94
101 TDECORE_EXPORT TQString joinArgs( const TQStringList &args );
102
113 TDECORE_EXPORT TQString joinArgsDQ( const TQStringList &args );
114
124 TDECORE_EXPORT TQString joinArgs( const char * const *argv, int argc = -1 );
125
133 TDECORE_EXPORT TQString tildeExpand( const TQString &path );
134
142 TDECORE_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

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.