aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-05-23 20:11:37 +0800
committerMu Qiao <qiaomuf@gentoo.org>2011-05-24 20:18:58 +0800
commitff1810c6f86b643aa8ac16951b7233b2d5daf632 (patch)
tree086de8dac9a81fbdab6b994f784018196cb52870 /src/cppbash_builtin.cpp
parentWalker: accept some bash redirection syntax (diff)
downloadlibbash-ff1810c6f86b643aa8ac16951b7233b2d5daf632.tar.gz
libbash-ff1810c6f86b643aa8ac16951b7233b2d5daf632.tar.bz2
libbash-ff1810c6f86b643aa8ac16951b7233b2d5daf632.zip
Builtin: support the declare built-in syntax
There's no actual logic for the built-in right now. Multiple options to the built-in is not supported for now.
Diffstat (limited to 'src/cppbash_builtin.cpp')
-rw-r--r--src/cppbash_builtin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cppbash_builtin.cpp b/src/cppbash_builtin.cpp
index aee18c9..edbfa8c 100644
--- a/src/cppbash_builtin.cpp
+++ b/src/cppbash_builtin.cpp
@@ -25,6 +25,7 @@
#include "cppbash_builtin.h"
#include "builtins/boolean_builtins.h"
+#include "builtins/declare_builtin.h"
#include "builtins/echo_builtin.h"
#include "builtins/inherit_builtin.h"
#include "builtins/return_builtin.h"
@@ -37,6 +38,7 @@ cppbash_builtin::cppbash_builtin(BUILTIN_ARGS): _out_stream(&out), _err_stream(&
cppbash_builtin::builtins_type& cppbash_builtin::builtins() {
static boost::scoped_ptr<builtins_type> p(new builtins_type {
{"echo", boost::factory<echo_builtin*>()},
+ {"declare", boost::factory<declare_builtin*>()},
{"source", boost::factory<source_builtin*>()},
{"inherit", boost::factory<inherit_builtin*>()},
{":", boost::factory<true_builtin*>()},