Command not found behavior, exit faster?
Is it possible to exit faster when a command is not found? I believe right now the current behavior is to make a web request to see if a command is on the server. I could be wrong? Instead, can pkgx keep a local cache of commands and exit without doing a web lookup? Besides the security risk of doing a web lookup if say, the user accidentally enters a password, it sends the wrong signal to pause because I keep thinking the command is actually running. Just put a message in the "not found" saying to update the pkgx cache to run pkgx --sync. If this is already the behavior then something is wrong with my terminal because it takes at least a second to run a command that doesn't exist.
> time a
cmd not found: a
a 0.77s user 1.05s system 68% cpu 2.679 total
Yes with shell integration we check remotely to see if the command can be found which indeed is slow and kinda naughty. We don't send the command you typed tho. We --sync so not insecure at least.
This facilitates the type \x` to run that` behavior for the case where the command is not known locally.
Could make this optional or something more clever.
pkgx^2 is both faster for this step, but also doesn’t have shellcode.