@@ -111,22 +111,22 @@ function complete_path(path::AbstractString, pos; use_envpath=false)
111
111
dir, prefix = splitdir (path)
112
112
end
113
113
local files
114
- try
114
+ # try
115
115
if isempty (dir)
116
116
files = readdir ()
117
117
elseif isdir (dir)
118
118
files = readdir (dir)
119
119
else
120
120
return String[], 0 : - 1 , false
121
121
end
122
- catch
123
- return String[], 0 : - 1 , false
124
- end
122
+ # catch
123
+ # return String[], 0:-1, false
124
+ # end
125
125
126
126
matches = Set {String} ()
127
127
for file in files
128
128
if startswith (file, prefix)
129
- id = try isdir (joinpath (dir, file)) catch ; false end
129
+ id = isdir (joinpath (dir, file))
130
130
# joinpath is not used because windows needs to complete with double-backslash
131
131
push! (matches, id ? file * (@static is_windows () ? " \\\\ " : " /" ) : file)
132
132
end
@@ -138,12 +138,12 @@ function complete_path(path::AbstractString, pos; use_envpath=false)
138
138
139
139
for pathdir in pathdirs
140
140
local actualpath
141
- try
141
+ # try
142
142
actualpath = realpath (pathdir)
143
- catch
143
+ # catch
144
144
# Bash doesn't expect every folder in PATH to exist, so neither shall we
145
- continue
146
- end
145
+ # continue
146
+ # end
147
147
148
148
if actualpath != pathdir && in (actualpath,pathdirs)
149
149
# Remove paths which (after resolving links) are in the env path twice.
@@ -152,17 +152,17 @@ function complete_path(path::AbstractString, pos; use_envpath=false)
152
152
end
153
153
154
154
local filesinpath
155
- try
155
+ # try
156
156
filesinpath = readdir (pathdir)
157
- catch e
157
+ # catch e
158
158
# Bash allows dirs in PATH that can't be read, so we should as well.
159
- if isa (e, SystemError)
160
- continue
161
- else
159
+ # if isa(e, SystemError)
160
+ # continue
161
+ # else
162
162
# We only handle SystemErrors here
163
- rethrow (e)
164
- end
165
- end
163
+ # rethrow(e)
164
+ # end
165
+ # end
166
166
167
167
for file in filesinpath
168
168
# In a perfect world, we would filter on whether the file is executable
0 commit comments