From e1164626c9933261b0ed8a13b257127b62c213c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 12 Jul 2021 10:51:53 +0200 Subject: .shrc: Improve m --- home/john/.shrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'home/john') diff --git a/home/john/.shrc b/home/john/.shrc index 51d3be7..4196bac 100644 --- a/home/john/.shrc +++ b/home/john/.shrc @@ -15,7 +15,6 @@ case "$-" in *i*) alias ack='ack --noheading' alias info='info --vi-keys' alias ls='ls -p' - alias m='less -XF' alias vi='utf8 vi' alias w3m='utf8 w3m' alias xinput='utf8 xinput' @@ -26,6 +25,14 @@ case "$-" in *i*) rm $f } + m() { + if [ -t 1 ]; then + "$@" 2>&1 | less -XF + else + less -XF + fi + } + go() { [ -z "$1" ] && { echo usage: $0 [cmd ...] name 2>&1; return 1; } eval name=\$$# -- cgit v1.2.3