diff --git a/en b/en index b536740..7ebea22 100755 --- a/en +++ b/en @@ -16,8 +16,10 @@ fi if test -z "$1"; then set -- /dev/stdin - HIGHLIGHT_OPTIONS="$HIGHLIGHT_OPTIONS --syntax=none" - export HIGHLIGHT_OPTIONS + export HIGHLIGHT_OPTIONS="$HIGHLIGHT_OPTIONS -S none" +else + export HIGHLIGHT_OPTIONS="$HIGHLIGHT_OPTIONS -S \ + $(printf '%s\n' "$1" | sed 's/^.*\.//g')" fi help="$(printf "Commands:\n\ @@ -70,7 +72,7 @@ while test -n "$1"; do "c") clear ;; "d") if test -z "$args"; then - printf "%s: %s: Missing argument.\n" "$0" "$command" 1>&2 + printf "%s: %s: missing argument.\n" "$0" "$command" 1>&2 else for line in $(printf "%s\n" "$args" | sed 's/,/\n/g') do @@ -82,12 +84,9 @@ while test -n "$1"; do "e") eval "$args" || true ;; - "h") - HIGHLIGHT_OPTIONS="$HIGHLIGHT_OPTIONS --syntax=$args" - export HIGHLIGHT_OPTIONS - ;; + "h") export HIGHLIGHT_OPTIONS="$HIGHLIGHT_OPTIONS -S $args" ;; "i") - printf "%s: i: Command not implemented.\n" "$0" 1>&2 + printf "%s: i: command not implemented.\n" "$0" 1>&2 ;; "p") printf "%s\n" "$content" | highlight | nl -ba >/dev/tty @@ -99,7 +98,7 @@ while test -n "$1"; do "x") exit ;; "") ;; *) - printf "%s: %s: unrecognized command\n" "$0" "$command" + printf "%s: %s: unrecognized command\n%s\n" "$0" "$command" "$help" ;; esac done