blob: 360f9ef38d005fb5eade58c3eca5858d977316cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
set +o posix
hash -r
unalias -a
# this should echo nothing
type
# this should be a usage error
type -f ${THIS_SH}
# these should behave identically
type notthere
command -v notthere
alias m=more
unset -f func 2>/dev/null
func() { echo this is func; }
type -t func
type -t while
type -t m
type -t builtin
type -t /bin/sh
type -t ${THIS_SH}
type func
# the following two should produce identical output
type while
type -a while
type m
type builtin
type /bin/sh
command -v func
command -V func
command -v while
command -V while
# the following three lines should produce the same output
command -v m
alias -p
alias m
command -V m
command -v builtin
command -V builtin
command -v /bin/sh
command -V /bin/sh
unset -f func
type func
unalias m
type m
hash -p /bin/sh sh
type -p sh
SHBASE=${THIS_SH##*/}
hash -p /tmp/$SHBASE $SHBASE
type -p $SHBASE
type $SHBASE
|