Added shell.which

This commit is contained in:
Sleepy Monax 2023-08-05 19:53:50 +02:00
parent 67187ff974
commit 865c18dfa3

View file

@ -254,3 +254,10 @@ def latest(cmd: str) -> str:
LATEST_CACHE[cmd] = chosen
return chosen
def which(cmd: str) -> str | None:
"""
Find the path of a command
"""
return shutil.which(cmd)