aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPetteri Räty <petsku@petteriraty.eu>2011-04-27 18:07:13 +0300
committerPetteri Räty <petsku@petteriraty.eu>2011-04-27 18:07:13 +0300
commit74f857d116fa51adaa22f78893d7f1e836a2346c (patch)
tree509236f524a047b52334a4c6edbbf0863564187f /utils
parentUtility: write a script that generates ebuild metadata (diff)
parentWalker: support case statement (diff)
downloadlibbash-74f857d116fa51adaa22f78893d7f1e836a2346c.tar.gz
libbash-74f857d116fa51adaa22f78893d7f1e836a2346c.tar.bz2
libbash-74f857d116fa51adaa22f78893d7f1e836a2346c.zip
Merge remote-tracking branch 'mu/compound_expr'
Diffstat (limited to 'utils')
-rw-r--r--utils/variable_printer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/variable_printer.cpp b/utils/variable_printer.cpp
index 192b3db..f06281b 100644
--- a/utils/variable_printer.cpp
+++ b/utils/variable_printer.cpp
@@ -32,6 +32,11 @@
#include "libbash.h"
+static const std::vector<std::string> special_variables
+{
+ "IFS", "?"
+};
+
int main(int argc, char** argv)
{
if(argc != 2)
@@ -46,7 +51,8 @@ int main(int argc, char** argv)
std::map<std::string, std::vector<std::string>> sorted(variables.begin(), variables.end());
// Currently we don't need internal variables
- sorted.erase("IFS");
+ for(auto iter = special_variables.begin(); iter != special_variables.end(); ++iter)
+ sorted.erase(*iter);
using namespace boost::spirit::karma;
std::cout << format((string << '=' << -(string % ' ')) % eol, sorted) << std::endl;