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

fix(history)!: fix arg passing to fc for history command #12338

Merged
merged 1 commit into from Apr 9, 2024

Conversation

MoAlkhateeb
Copy link
Contributor

fixes #12334 by not forcing the 1 argument and giving the user more control.

@ohmyzsh ohmyzsh bot added the Area: core Issue or PR related to core parts of the project label Apr 8, 2024
@mcornella mcornella changed the title Fixed a bug in *omz_history* automatically creating files. fix(history)!: fix arg passing to fc for history command Apr 9, 2024
@mcornella mcornella merged commit a8f7f9f into ohmyzsh:master Apr 9, 2024
1 check passed
@mhagnumdw
Copy link

The side effect of this change is that the user expects to see the full history when typing history, but will now only see the last 16 records. You even think that the history has been deleted!!

@filipeacacio
Copy link

I believe this is not a good solution, as the default behavior of a widely used command has changed.

@MoAlkhateeb
Copy link
Contributor Author

We could fix that by explicitly handling the case when the user doesn't use any arguments to show all the history starting from 1. This would keep the behaviour the same while still fixing the issue. What do you think? @filipeacacio @mhagnumdw @mcornella @carlosala

@filipeacacio
Copy link

We could fix that by explicitly handling the case when the user doesn't use any arguments to show all the history starting from 1. This would keep the behaviour the same while still fixing the issue. What do you think? @filipeacacio @mhagnumdw @mcornella @carlosala

Sounds good for me.

@mhagnumdw
Copy link

We could fix that by explicitly handling the case when the user doesn't use any arguments to show all the history starting from 1. This would keep the behaviour the same while still fixing the issue. What do you think? @filipeacacio @mhagnumdw @mcornella @carlosala

Great

@mcornella
Copy link
Member

Merged, thanks folks for the fast turnaround.

lukaselmer pushed a commit to lukaselmer/ohmyzsh that referenced this pull request Apr 16, 2024
…#12338)

BREAKING CHANGE: we have fixed a bug in the `history` wrapper for OMZ which means
that running just history will now not show all the history since the 1st command,
but only recent ones. To get the previous behavior, you can run `history 1` to get
all the command history, or other commands such as `history -30` to get the last
30 commands.
cschuyle pushed a commit to cschuyle/ohmyzsh that referenced this pull request Apr 18, 2024
…#12338)

BREAKING CHANGE: we have fixed a bug in the `history` wrapper for OMZ which means
that running just history will now not show all the history since the 1st command,
but only recent ones. To get the previous behavior, you can run `history 1` to get
all the command history, or other commands such as `history -30` to get the last
30 commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Issue or PR related to core parts of the project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

omz_history -p doesn't work as expected
4 participants