always expone mksh’s hexdumper
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.114 2017/03/19 22:31:26 tg Exp $
|
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.115 2017/08/08 20:22:16 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012, 2013, 2014, 2015, 2016, 2017
|
# 2011, 2012, 2013, 2014, 2015, 2016, 2017
|
||||||
@@ -99,6 +99,11 @@ elif \\builtin command -v hexdump >/dev/null; then
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
function hd {
|
function hd {
|
||||||
|
hd_mksh "$@"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
function hd_mksh {
|
||||||
\\builtin typeset -Uui16 -Z11 pos=0
|
\\builtin typeset -Uui16 -Z11 pos=0
|
||||||
\\builtin typeset -Uui16 -Z5 hv=2147483647
|
\\builtin typeset -Uui16 -Z5 hv=2147483647
|
||||||
\\builtin typeset dasc line i
|
\\builtin typeset dasc line i
|
||||||
@@ -133,7 +138,6 @@ else
|
|||||||
(( hv == 2147483647 )) || \\builtin print -r -- "$dasc|"
|
(( hv == 2147483647 )) || \\builtin print -r -- "$dasc|"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
# Berkeley C shell compatible dirs, popd, and pushd functions
|
# Berkeley C shell compatible dirs, popd, and pushd functions
|
||||||
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
|
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
|
||||||
@@ -483,6 +487,7 @@ function enable {
|
|||||||
i_func[nfunc++]=setenv
|
i_func[nfunc++]=setenv
|
||||||
i_func[nfunc++]=smores
|
i_func[nfunc++]=smores
|
||||||
i_func[nfunc++]=hd
|
i_func[nfunc++]=hd
|
||||||
|
i_func[nfunc++]=hd_mksh
|
||||||
i_func[nfunc++]=chpwd
|
i_func[nfunc++]=chpwd
|
||||||
i_func[nfunc++]=cd
|
i_func[nfunc++]=cd
|
||||||
i_func[nfunc++]=cd_csh
|
i_func[nfunc++]=cd_csh
|
||||||
|
Reference in New Issue
Block a user