[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] [patch correction] stumpish, fixed prefix
From: |
38a938c2 |
Subject: |
[STUMP] [patch correction] stumpish, fixed prefix |
Date: |
Mon, 25 Aug 2008 00:21:45 +0400 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080804) |
Sorry, I must be semi-colour-blind: didn't noticed I missed the colour
clause during first testing of the patch. Here are both original and
correcting commit (I still haven't learnt merging them, or even deleting
them with Git)
>From 691d0b3b0330b2832e99eab9769f7b50b9742f9a Mon Sep 17 00:00:00 2001
From: 38a938c2 <address@hidden>
Date: Mon, 25 Aug 2008 00:12:36 +0400
Subject: [PATCH] Added possibility to prepend a fixed prefix to each command
---
contrib/stumpish | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/contrib/stumpish b/contrib/stumpish
index 1d48bb4..8bb0661 100755
--- a/contrib/stumpish
+++ b/contrib/stumpish
@@ -100,6 +100,11 @@ then
shift 1
fi
+if [ "x$1" = "x-prefix" ]; then
+ export STUMPISH_COMMAND_PREFIX="$2 ";
+ shift 2;
+fi;
+
if [ $# -gt 0 ]
then
[ "$1" = "--help" ] && usage
@@ -134,12 +139,16 @@ else
tput setaf 5
echo Welcome to the STUMPwm Interactive SHell.
- tput sgr0
- echo -n 'Type '
- tput setaf 2
- echo -n commands
- tput sgr0
- echo \ for a list of commands.
+ if [ -z "$STUMPISH_COMMAND_PREFIX" ]; then
+ tput sgr0
+ echo -n 'Type '
+ tput setaf 2
+ echo -n commands
+ tput sgr0
+ echo \ for a list of commands.
+ else
+ echo "Every command will be prepended with
\`$STUMPISH_COMMAND_PREFIX'";
+ fi;
IFS='
'
@@ -148,7 +157,7 @@ else
do
tput bold
tput setaf 2
- send_cmd "$REPLY"
+ send_cmd "$STUMPISH_COMMAND_PREFIX$REPLY"
tput sgr0
echo -n "> "
--
1.6.0
>From ed8c68af965a01d3e81f03de1cb6ffec08c5d297 Mon Sep 17 00:00:00 2001
From: 38a938c2 <address@hidden>
Date: Mon, 25 Aug 2008 00:18:05 +0400
Subject: [PATCH] Fixed colours
---
contrib/stumpish | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/stumpish b/contrib/stumpish
index 8bb0661..69a6ada 100755
--- a/contrib/stumpish
+++ b/contrib/stumpish
@@ -148,6 +148,7 @@ else
echo \ for a list of commands.
else
echo "Every command will be prepended with
\`$STUMPISH_COMMAND_PREFIX'";
+ tput sgr0
fi;
IFS='
--
1.6.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [STUMP] [patch correction] stumpish, fixed prefix,
38a938c2 <=