Lines Matching refs:builtin
35 \\builtin eval '\\builtin export "$1"="${2:-}"'
37 \\builtin typeset -x
43 \\builtin set +m
44 \\builtin cat "$@" |&
45 \\builtin trap "rv=\$?; \\\\builtin kill $! >/dev/null 2>&1; \\\\builtin exit \$rv" EXIT
46 while IFS= \\builtin read -pr line; do
51 \\builtin print -nr -- $'\e[7m--more--\e[0m'
52 \\builtin read -u1 || \\builtin exit $?
53 [[ $REPLY = [Qq]* ]] && \\builtin exit 0
56 \\builtin print -r -- "$line"
62 EDITOR=$(\\builtin whence -p "$EDITOR") || EDITOR=
67 \\builtin alias ls=ls l='ls -F' la='l -a' ll='l -l' lo='l -alo'
68 \: "${EDITOR:=/bin/ed}${TERM:=vt100}${USER:=$(\\builtin ulimit -c 0; id -un \
69 2>/dev/null)}${HOSTNAME:=$(\\builtin ulimit -c 0; hostname 2>/dev/null)}"
70 [[ $HOSTNAME = ?(?(ip6-)localhost?(6)) ]] && HOSTNAME=nil; \\builtin unalias ls
71 \\builtin export EDITOR HOSTNAME TERM USER="${USER:-?}"
76 \\builtin return 0
80 \: "${MKSH:=$(\\builtin whence -p mksh)}${MKSH:=/bin/mksh}"
81 \\builtin export MKSH
85 \\builtin typeset e=$?
90 \\builtin typeset d=${PWD:-?}/ p=~; [[ $p = ?(*/) ]] || d=${d/#$p\//\~/}
91 d=${d%/}; \\builtin typeset m=${%d} n p=...; (( m > 0 )) || m=${#d}
95 \\builtin return $e
99 \\builtin alias doch='sudo mksh -c "$(\\builtin fc -ln -1)"'
100 \\builtin command -v rot13 >/dev/null || \\builtin alias rot13='tr \
103 if \\builtin command -v hd >/dev/null; then
105 elif \\builtin command -v hexdump >/dev/null; then
112 \\builtin cat "$@" | hd_mksh
118 \\builtin typeset -Uui16 -Z11 pos=0
119 \\builtin typeset -Uui16 -Z5 hv=2147483647
120 \\builtin typeset dasc dn line i
121 \\builtin set +U
123 while \\builtin read -arn 512 line; do
124 \\builtin typeset -i1 'line[*]'
131 \\builtin print -r -- "$dasc|"
132 \\builtin print -nr "${pos#16#} "
135 \\builtin print -nr "${hv#16#} "
142 \\builtin print -nr -- '- '
146 \\builtin print -nr ' '
148 \\builtin print -nr -- '- '
150 (( hv == 2147483647 )) || \\builtin print -r -- "$dasc|"
154 \\builtin typeset p x c
155 \\builtin typeset -i a=0 rv=2 e
156 \\builtin set +e
157 \\builtin set -o noglob
159 while \\builtin getopts "a" x; do
163 (*) \\builtin print -ru2 'Usage: which [-a] name [...]'
164 \\builtin return 255 ;;
167 \\builtin shift $((OPTIND - 1))
177 \\builtin set -A p -- ${p:-.}
182 \\builtin whence -p -- "$x"
187 PATH=${c:-.} \\builtin whence -p -- "$x" && e=0
192 \\builtin return $rv
197 DIRSTACKBASE=$(\\builtin realpath ~/. 2>/dev/null || \
198 \\builtin print -nr -- "${HOME:-/}")
199 \\builtin set -A DIRSTACK
201 DIRSTACK[0]=$(\\builtin realpath . 2>/dev/null || \
202 \\builtin print -nr -- "$PWD")
209 \\builtin cd "$@" || \\builtin return $?
213 \\builtin typeset d t=${1/#\~/$DIRSTACKBASE}
215 if ! d=$(\\builtin cd "$t" 2>&1); then
216 \\builtin print -ru2 "${1}: ${d##*cd: $t: }."
217 \\builtin return 1
222 \\builtin typeset d dwidth
223 \\builtin typeset -i fl=0 fv=0 fn=0 cpos=0
225 while \\builtin getopts ":lvn" d; do
230 (*) \\builtin print -ru2 'Usage: dirs [-lvn].'
231 \\builtin return 1 ;;
234 \\builtin shift $((OPTIND - 1))
236 \\builtin print -ru2 'Usage: dirs [-lvn].'
237 \\builtin return 1
244 \\builtin print -r -- "$fv $d"
255 \\builtin print
258 \\builtin print -nr -- "$d "
261 \\builtin print
263 \\builtin return 0
266 \\builtin typeset d fa
267 \\builtin typeset -i n=1
269 while \\builtin getopts ":0123456789lvn" d; do
273 \\builtin break ;;
274 (*) \\builtin print -ru2 'Usage: popd [-lvn] [+<n>].'
275 \\builtin return 1 ;;
278 \\builtin shift $((OPTIND - n))
281 \\builtin print -ru2 popd: Too many arguments.
282 \\builtin return 1
285 \\builtin print -ru2 popd: Directory stack not that deep.
286 \\builtin return 1
289 \\builtin print -ru2 popd: Bad directory.
290 \\builtin return 1
293 \\builtin print -ru2 popd: Directory stack empty.
294 \\builtin return 1
296 \\builtin unset DIRSTACK[n]
297 \\builtin set -A DIRSTACK -- "${DIRSTACK[@]}"
298 \cd_csh "${DIRSTACK[0]}" || \\builtin return 1
302 \\builtin typeset d fa
303 \\builtin typeset -i n=1
305 while \\builtin getopts ":0123456789lvn" d; do
309 \\builtin break ;;
310 (*) \\builtin print -ru2 'Usage: pushd [-lvn] [<dir>|+<n>].'
311 \\builtin return 1 ;;
314 \\builtin shift $((OPTIND - n))
317 \\builtin print -ru2 pushd: No other directory.
318 \\builtin return 1
322 \cd_csh "$d" || \\builtin return 1
324 \\builtin print -ru2 pushd: Too many arguments.
325 \\builtin return 1
328 \\builtin print -ru2 pushd: Directory stack not that deep.
329 \\builtin return 1
333 \\builtin unset DIRSTACK[0]
334 \\builtin set -A DIRSTACK -- "${DIRSTACK[@]}" "$d"
336 \cd_csh "${DIRSTACK[0]}" || \\builtin return 1
338 \\builtin set -A DIRSTACK -- placeholder "${DIRSTACK[@]}"
339 \cd_csh "$1" || \\builtin return 1
346 \\builtin set +U
347 \\builtin typeset c s="$*" t
348 [[ -n $s ]] || { s=$(\\builtin cat; \\builtin print x); s=${s%x}; }
349 \\builtin typeset -i i=0 j=0 n=${#s} p=0 v x
350 \\builtin typeset -i16 o
355 (=) \\builtin break ;;
361 (*) \\builtin continue ;;
365 (0) \\builtin continue ;;
373 (( ++j & 4095 )) && \\builtin continue
374 \\builtin print -n $t
377 \\builtin print -n $t
380 \\builtin set +U
381 \\builtin typeset c s t table
382 \\builtin set -A table -- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \
385 \\builtin read -raN-1 s <<<"$*"
386 \\builtin unset s[${#s[*]}-1]
388 \\builtin read -raN-1 s
390 \\builtin typeset -i i=0 n=${#s[*]} v
406 \\builtin print -r $t
413 \\builtin typeset -Z11 -Uui16 Lbafh_v
418 \\builtin set +U
419 \\builtin typeset s
421 \\builtin read -raN-1 s <<<"$*"
422 \\builtin unset s[${#s[*]}-1]
424 \\builtin read -raN-1 s
426 \\builtin typeset -i i=0 n=${#s[*]}
434 \\builtin typeset -Ui t
446 \\builtin set -o noglob
447 \\builtin cat "$@" | while \\builtin read _line; do
449 [[ -n $_line ]] && \\builtin print -r -- $_line
455 \\builtin typeset doprnt=0 mode=1 x y z rv=0
456 \\builtin typeset b_alias i_alias i_func nalias=0 nfunc=0 i_all
457 \\builtin set -A b_alias
458 \\builtin set -A i_alias
459 \\builtin set -A i_func
462 i_alias[nalias]=autoload; b_alias[nalias++]='\\builtin typeset -fu'
463 i_alias[nalias]=functions; b_alias[nalias++]='\\builtin typeset -f'
464 i_alias[nalias]=hash; b_alias[nalias++]='\\builtin alias -t'
465 i_alias[nalias]=history; b_alias[nalias++]='\\builtin fc -l'
466 i_alias[nalias]=integer; b_alias[nalias++]='\\builtin typeset -i'
467 i_alias[nalias]=local; b_alias[nalias++]='\\builtin typeset'
468 i_alias[nalias]=login; b_alias[nalias++]='\\builtin exec login'
469 i_alias[nalias]=nameref; b_alias[nalias++]='\\builtin typeset -n'
471 i_alias[nalias]=r; b_alias[nalias++]='\\builtin fc -e -'
472 i_alias[nalias]=type; b_alias[nalias++]='\\builtin whence -v'
480 # \\builtin cannot, by design, be overridden
481 i_func[nfunc++]=builtin
534 i_alias[nalias]=doch; b_alias[nalias++]='sudo mksh -c "$(\\builtin fc -ln -1)"'
536 i_alias[nalias]=cls; b_alias[nalias++]='\\builtin print -n \\ec'
559 \\builtin set -sA i_all -- "${i_alias[@]}" "${i_func[@]}"
562 while \\builtin getopts "adf:nps" x; do
571 \\builtin print -ru2 enable: dynamic loading not available
572 \\builtin return 2
581 \\builtin set -sA i_all -- . : break continue eval \
586 \\builtin print -ru2 enable: usage: \
592 \\builtin shift $((OPTIND - 1))
597 y=$(\\builtin alias "$x") || y=
598 …[[ $y = "$x='\\\\builtin whence -p $x >/dev/null || (\\\\builtin print -r mksh: $x: not found; \\\…
601 \\builtin print -r -- "enable -n $x"
604 \\builtin print -r -- "enable $x"
608 \\builtin return 0
614 [[ $x = "$y" ]] || \\builtin continue
616 \\builtin break
619 \\builtin print -ru2 enable: "$x": not a shell builtin
621 \\builtin continue
625 …\\builtin alias "$x=\\\\builtin whence -p $x >/dev/null || (\\\\builtin print -r mksh: $x: not fou…
631 [[ $x = "${i_alias[y]}" ]] || \\builtin continue
633 \\builtin break
637 \\builtin alias "$x=${b_alias[y]}"
640 \\builtin unalias "$x"
644 \\builtin return $rv
655 [[ -d $p/. ]] || \\builtin continue
660 \\builtin export SHELL=$MKSH MANWIDTH=80 LESSHISTFILE=-
661 \\builtin alias cls='\\builtin print -n \\ec'
663 #\\builtin unset LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
667 #\\builtin export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
668 #\\builtin export LANG=C.UTF-8 LC_CTYPE=C.UTF-8
669 #\\builtin export LC_ALL=C.UTF-8
670 #\\builtin set -U
671 #[[ ${LC_ALL:-${LC_CTYPE:-${LANG:-}}} = *[Uu][Tt][Ff]?(-)8* ]] || \\builtin set +U
673 \\builtin unset p