commit 76bf9293168e576db865c9907df8885b3e7b6c0c
parent bb69408539f8056dd50d3b7122be803d291a890b
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date: Tue, 18 Jul 2017 13:50:31 +0200
editor among those availables
Diffstat:
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/bin/80 b/bin/80
@@ -0,0 +1,13 @@
+awk '
+
+BEGIN { ARGC = 1 }
+
+{
+ sub(" *\\" ARGV[2] "*$", " ", $0)
+ line = $0
+ for (i = 80 - length($0); i > 0; i--)
+ line = line ARGV[2]
+ print line
+}
+
+' - "${1:-=}"
diff --git a/bin/txt b/bin/txt
@@ -28,8 +28,9 @@ ELEMENT && /^$/ {
next
}
-!ELEMENT && /^- / {
+(!ELEMENT || ELEMENT == "li") && /^- / {
sub(/^- /, "", $0)
+ if (ELEMENT == "li") print "</li>\n"
print "<li>\n" $0
ELEMENT = "li"
next
diff --git a/shell/.profile b/shell/.profile
@@ -7,10 +7,8 @@ export EMAIL='mail@josuah.net'
export TZ='Europe/Paris'
export LC_ALL='en_US.UTF-8'
-export EDITOR=vi
-export VISUAL=vi
-export PAGER=less
-export MANPAGER=less
-export BROWSER=firefox
+command -v vim && export EDITOR=vim || export EDITOR=vi
+command -v less && export PAGER=less || export PAGER=more
+export VISUAL=$EDITOR MANPAGER=$PAGER
. "$ETC/shell/rc"