-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should %run
be the built-in way binaries are run?
#80
Comments
I like the idea of replacing the forkexec() calls in eval() with If the result is non-zero from
Of course, how such changes interact with |
Hmm, those are interesting ideas -- I'd never thought about the idea that with enough runtime support, it could be possible to change the shell's idea of true/false. I'm not sure I'd want to use that shell, but it's certainly interesting to consider :) Questions of design aside... Unfortunately, exceptions coming from The basic challenge is that |
es has a hook function called
%run
for fork/exec-ing a binary with the given arguments as itsargv
. This is cool, but the function isn't actually used by es itself without some hackery to%pathsearch
and then potentially doing something to deal with the fact that
%whatis bin
now returns the uglyand then feeling sad about the fact that if a user passes in an absolute path,
%run
just won't be called.It seems more es-ish to just replace the
forkexec()
calls ineval()
with calls to%run
(or maybe fall back to$&run
, if%run
isn't set). Outside of$&run
,eval()
is the only place whereforkexec()
gets called, so this would be a complete implementation of the hook function.A concrete possibility this enables is the setting of a bash- or zsh-like
$_
for any invoked binary (fromman bash
, this: "the full pathname used to invoke each command executed and placed in the environment exported to that command"), like this:The text was updated successfully, but these errors were encountered: