Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
505 stars 22 forks source link

perf: cache command locations #212

Open TorchedSammy opened 1 year ago

TorchedSammy commented 1 year ago

this means that hilbish can save time searching $PATH for an executable. if $PATH ever changes, the cache is invalidated. this is similar to how bash functions and also provides the hash command.

should the command be named hash though? it's not immediately obvious, and posix compat isnt a concern so it could just be called ccache or anything else that fits. it would also be less confusing as a lua function, since it of course needs to be exposed to lua too.