simplify which and type a bit

This commit is contained in:
Lisa Milne 2023-11-12 21:22:48 +10:00
parent 221599955a
commit df55e9f3ad

View file

@ -1345,10 +1345,8 @@ clite.shell = {
return;
}else{
var path = clite.shell.resolvePath(args[1]);
var fd = clite.io.open(path,false);
if (!fd)
if (!path)
return;
clite.io.close(fd);
io.write(args[1]+' is '+path);
}
},
@ -1359,10 +1357,8 @@ clite.shell = {
io.write(args[1]+' is a shell builtin');
}else{
var path = clite.shell.resolvePath(args[1]);
var fd = clite.io.open(path,false);
if (!fd)
if (!path)
return;
clite.io.close(fd);
io.write(args[1]+' is '+path);
}
},