Skip to content
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

exec builtin doesn't take flags #5779

Open
lilyball opened this issue Mar 30, 2019 · 2 comments
Open

exec builtin doesn't take flags #5779

lilyball opened this issue Mar 30, 2019 · 2 comments

Comments

@lilyball
Copy link
Contributor

The exec builtin seems to support parsing flags (based on error messages if you try and provide one), but it doesn't actually define any flags. Bash's exec takes 3 flags, 2 of which are clearly useful and one of which is questionable. I think we should at least add support for the -l and -a flags.

  • -l: If the first argument to exec is -l then this prefixes the zeroth arg with a dash as login does.
  • -a name: This flag passes name as the zeroth arg.

exec -l foo is clearly just shorthand for exec -a -foo foo, but is admittedly convenient.

As it is, if I want to replace my fish shell with a command using a custom name I need to write something like exec bash -c 'exec -a foo bar' which is silly.

@faho faho added this to the fish-future milestone Mar 30, 2019
@floam
Copy link
Member

floam commented Mar 30, 2019

Yeah, I'd like -a or an --argv0. As it is, I have to write small C programs to affect these.

@floam
Copy link
Member

floam commented Mar 30, 2019

These could also be arguments for command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants