remove id parameter - sob - simple output bar
(HTM) git clone git://git.codemadness.org/sob
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 12d2c2bd8352b53400a7808b51ffdc2aa757c753
(DIR) parent c724e2f7987bba8b9b9c52ebb3ff77721786d2a6
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 1 Oct 2014 23:15:55 +0000
remove id parameter
this can just be set with an envionment variable for example to identify
per sob 'session'.
Diffstat:
M scripts/complete_word | 2 --
M scripts/history | 4 +---
M sob.1 | 3 ---
M sob.c | 5 +----
4 files changed, 2 insertions(+), 12 deletions(-)
---
(DIR) diff --git a/scripts/complete_word b/scripts/complete_word
@@ -4,8 +4,6 @@ grepword() {
grep -E "^$1" < out.log
}
-id=""
-test x"$1" != x"" && id="$1"
read -r word
#if test x"$DISPLAY" = x""; then
(DIR) diff --git a/scripts/history b/scripts/history
@@ -1,8 +1,6 @@
#!/bin/sh
-id=""
-test x"$1" != x"" && id="$1"
-file="out.log"
+file="out.log"
test -f "$file" || exit 1
#if test x"$DISPLAY" = x""; then
(DIR) diff --git a/sob.1 b/sob.1
@@ -18,9 +18,6 @@ sob is a simple line editor.
.B \-f " outfile"
output file.
.TP
-.B \-i " id"
-extra parameter passed to program.
-.TP
.B \-l " line"
initial input on line.
.TP
(DIR) diff --git a/sob.c b/sob.c
@@ -553,7 +553,7 @@ run(void)
static void
usage(void)
{
- fprintf(stderr, "usage: %s <-f outfile> [-i id] [-l line] [-p prompt] "
+ fprintf(stderr, "usage: %s <-f outfile> [-l line] [-p prompt] "
"[-r resizecmd]\n", argv0);
exit(EXIT_FAILURE);
}
@@ -565,9 +565,6 @@ main(int argc, char **argv)
case 'f':
outname = EARGF(usage());
break;
- case 'i':
- strlcpy(id, EARGF(usage()), sizeof(id));
- break;
case 'l':
line_set(EARGF(usage()));
break;