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

Use builtin history instead of history #55

Closed
gnachman opened this issue Sep 23, 2017 · 3 comments
Closed

Use builtin history instead of history #55

gnachman opened this issue Sep 23, 2017 · 3 comments

Comments

@gnachman
Copy link

Some users like to redefine bash builtins, so it's unsafe to use them without saying builtin first. Here's an issue report where a user had defined an alias for history and it broke bash-preexec: https://gitlab.com/gnachman/iterm2/issues/6063

What do you think about replacing the use of history with builtin history?

@d630
Copy link
Contributor

d630 commented Sep 23, 2017

Yeah.

Or command \history.

Some users like to redefine bash builtins, so it's unsafe to use them without saying builtin first.

Cons: It slows down everything a bit, and you need to take care of quoting in combination with some builtins.

And what about:

alias builtin='echo alias'; function builtin { echo func; };

@rcaloras
Copy link
Owner

rcaloras commented Sep 23, 2017

@gnachman sgtm.
@d630 The cons you listed apply to adding builtin here?

Stamp #56 if you think we're good to go and I'll merge and tag 👍

@rcaloras
Copy link
Owner

Cut 0.3.4. @gnachman thanks for reporting.

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

No branches or pull requests

3 participants