From b12430eaa959a818d7df5b49c61f5db2100f5fc7 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 16 Dec 2016 01:22:42 +0100 Subject: [PATCH] Bugfixes, output format improvements --- bin/phpl-config | 4 ++-- install.sh | 10 ++++++---- lib/config.php | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/phpl-config b/bin/phpl-config index cf66560..300c2a6 100755 --- a/bin/phpl-config +++ b/bin/phpl-config @@ -82,11 +82,11 @@ if (cmdl_get($opts,'list')) { printf(" \e[1m%-15s\e[0m %-15s [\e[37;44m%s\e[0m]\n %s\n", $item[0], $item[1], demo($item), $attr); } } elseif (cmdl_get($opts,'list-modules')) { - printf("Available modules:\n"); + printf("Available modules and options:\n"); foreach ($_MODULES as $module) { printf(" - \e[1m%s\e[0m: %s\n", $module->name, $module->info); foreach ($module->opts as $opt) { - printf(" + <%s>%s - %s (default:\e[1m%s\e[0m)\n", $opt->type, $opt->name, $opt->descr, var_export($opt->def,true)); + printf(" = \e[94m%s\e[0m<\e[36m%s\e[0m> - %s (default:\e[1m%s\e[0m)\n", $opt->name, $opt->type, $opt->descr, var_export($opt->def,true)); } } } elseif (($delete = cmdl_get($opts,'delete'))) { diff --git a/install.sh b/install.sh index 9442acd..dd035a4 100755 --- a/install.sh +++ b/install.sh @@ -18,27 +18,29 @@ cp -R bin $INSTALL_DIR/ cp powerline.sh $INSTALL_DIR/ echo " Done" -echo "Installing modules:" +echo -n "Installing modules:" MODULES_SRC=./modules MODULES_DST=$INSTALL_DIR/modules if [ ! -d $MODULES_DST ]; then mkdir $MODULES_DST fi for MODULE in $MODULES_SRC/*.php; do - echo " ~> $(basename $MODULE .php)" + # echo " ~> $(basename $MODULE .php)" cp $MODULE $MODULES_DST done +echo " Done" -echo "Installing themes:" +echo -n "Installing themes:" THEMES_SRC=./themes THEMES_DST=$INSTALL_DIR/themes if [ ! -d $THEMES_DST ]; then mkdir $THEMES_DST fi for THEME in $THEMES_SRC/*.theme; do - echo " ~> $(basename $THEME .theme)" + # echo " ~> $(basename $THEME .theme)" cp $THEME $THEMES_DST done +echo " Done" if [ ! -d ~/bin ]; then echo "Skipping automatic symlink creation, please add $INSTALL_DIR/bin to your path." diff --git a/lib/config.php b/lib/config.php index d6c1130..2797e28 100644 --- a/lib/config.php +++ b/lib/config.php @@ -88,7 +88,7 @@ function config_item_delete($name) { global $_CONFIG; $filtered = []; foreach ($_CONFIG['items'] as $item) { - if ($item[1]!=$name) { + if ($item[0]!=$name) { $filtered[] = $item; } }