let hd_mksh take from stdin, great simplification
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# $Id$
|
||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.117 2017/08/08 20:40:25 tg Exp $
|
||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.118 2017/08/08 20:42:16 tg Exp $
|
||||
#-
|
||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012, 2013, 2014, 2015, 2016, 2017
|
||||
@ -99,7 +99,7 @@ elif \\builtin command -v hexdump >/dev/null; then
|
||||
}
|
||||
else
|
||||
function hd {
|
||||
hd_mksh "$@"
|
||||
\\builtin cat "$@" | hd_mksh "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
@ -109,7 +109,6 @@ function hd_mksh {
|
||||
\\builtin typeset dasc dn line i
|
||||
\\builtin set +U
|
||||
|
||||
\\builtin cat "$@" | {
|
||||
while \\builtin read -arn 512 line; do
|
||||
\\builtin typeset -i1 'line[*]'
|
||||
i=0
|
||||
@ -139,7 +138,6 @@ function hd_mksh {
|
||||
done
|
||||
(( hv == 2147483647 )) || \\builtin print -r -- "$dasc|"
|
||||
}
|
||||
}
|
||||
|
||||
# Berkeley C shell compatible dirs, popd, and pushd functions
|
||||
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
|
||||
|
Reference in New Issue
Block a user