File tree 4 files changed +8
-7
lines changed 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ _cvsps()
44
44
return 0
45
45
;;
46
46
--root)
47
- type _cvs_roots & > /dev/null && _cvs_roots
47
+ declare -F _cvs_roots & > /dev/null && _cvs_roots
48
48
return 0
49
49
;;
50
50
esac
@@ -55,7 +55,7 @@ _cvsps()
55
55
--cvs-direct --no-cvs-direct --debuglvl -Z --root -q -A' \
56
56
-- " $cur " ) )
57
57
else
58
- type _cvs_roots & > /dev/null && _cvs_roots
58
+ declare -F _cvs_roots & > /dev/null && _cvs_roots
59
59
fi
60
60
} &&
61
61
complete -F _cvsps cvsps
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ _portinstall()
48
48
complete -F _portinstall -o dirnames portinstall
49
49
50
50
# _pkg_delete is in pkg_install
51
- type _pkg_delete & > /dev/null && have pkg_deinstall && \
51
+ declare -F _pkg_delete & > /dev/null && have pkg_deinstall && \
52
52
complete -F _pkg_delete -o dirnames pkg_deinstall
53
53
54
54
# Local variables:
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ _rsync()
72
72
compopt +o nospace
73
73
;;
74
74
* :* )
75
- if type _scp_remote_files & > /dev/null; then
75
+ if declare -F _scp_remote_files & > /dev/null; then
76
76
# find which remote shell is used
77
77
local i shell=ssh
78
78
for (( i= 1 ; i < cword; i++ )) ; do
@@ -86,7 +86,8 @@ _rsync()
86
86
;;
87
87
* )
88
88
_known_hosts_real -c -a " $cur "
89
- type _scp_local_files & > /dev/null && _scp_local_files || _filedir
89
+ declare -F _scp_local_files & > /dev/null && \
90
+ _scp_local_files || _filedir
90
91
;;
91
92
esac
92
93
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ _sshfs()
11
11
12
12
_expand || return 0
13
13
14
- if [[ " $cur " == * :* ]] && type _scp_remote_files & > /dev/null ; then
14
+ if [[ " $cur " == * :* ]] && declare -F _scp_remote_files & > /dev/null ; then
15
15
_scp_remote_files -d
16
16
# unlike scp and rsync, sshfs works with 1 backslash instead of 3
17
17
COMPREPLY=( " ${COMPREPLY[@]// \\\\\\ / \\ } " )
@@ -20,7 +20,7 @@ _sshfs()
20
20
21
21
[[ " $cur " == * /* ]] || _known_hosts_real -c -a " $cur "
22
22
23
- type _scp_local_files & > /dev/null && _scp_local_files -d
23
+ declare -F _scp_local_files & > /dev/null && _scp_local_files -d
24
24
25
25
return 0
26
26
} &&
You can’t perform that action at this time.
0 commit comments