summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-07 02:47:02 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-07 02:47:02 -0500
commitd252b0a3eecfdf99c672ebc4cdd552087983f485 (patch)
tree4b8effd83b748bacd508e798578517f4ef565513
parent4c96b02ae96318b1a83abffc20251abbdcb7d8ed (diff)
Minor touch-ups
-rw-r--r--.gitignore1
-rw-r--r--batterymon.sh1
-rw-r--r--ord.c2
-rw-r--r--roll.go2
-rw-r--r--v-editor.sh4
5 files changed, 5 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 1347fbf..e1a11d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,6 @@ ord
roll
tempmon
urldecode
+urlencode
v-www-browser
v-editor
diff --git a/batterymon.sh b/batterymon.sh
index 34e7faa..f46c6ed 100644
--- a/batterymon.sh
+++ b/batterymon.sh
@@ -7,7 +7,6 @@ fi
thresh=$1
cmd=$2
-
while true; do
num=`acpi|sed -nr '/Discharging/s/.*, ([0-9]*)%,.*/\1/p'`
num=${num:-100}
diff --git a/ord.c b/ord.c
index b0957ff..4de4efe 100644
--- a/ord.c
+++ b/ord.c
@@ -11,5 +11,5 @@ main (int argc, char* argv[]) {
delim=" ";
i++;
}
+ putchar('\n');
}
-
diff --git a/roll.go b/roll.go
index 1848754..c6095d9 100644
--- a/roll.go
+++ b/roll.go
@@ -10,7 +10,7 @@ import (
)
func usage() {
- fmt.Printf("Arguments are in the format [<COUNT>]d<SIZE>[+MOD]\n")
+ fmt.Printf("Arguments are in the format [<COUNT>]d<SIZE>[+<MOD>]\n")
}
func roll(input string) {
diff --git a/v-editor.sh b/v-editor.sh
index 09bccf5..e6df2b3 100644
--- a/v-editor.sh
+++ b/v-editor.sh
@@ -3,11 +3,11 @@
run() {
local editor=$1; shift
local cmd
- IFS='|' cmd=($(eval printf '%s\|' "$editor"))
+ eval "cmd=($(printf '%q ' "$editor"))"
cmd+=("$@")
"${cmd[@]}"
}
(if [ -n "$DISPLAY" ]; then run "${VISUAL:-$SELECTED_EDITOR}" "$@"
else run "${EDITOR:-$SELECTED_EDITOR}" "$@"
-fi) || run "${ALTERNATE_EDITOR:-false}" "$@"
+ fi) || run "${ALTERNATE_EDITOR:-false}" "$@"