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

Ensure history uses fish builtin #65

Merged
merged 2 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified functions/__fzf_search_git_status.fish
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions functions/__fzf_search_history.fish
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function __fzf_search_history --description "Search command history using fzf. Replace the commandline with the selected command."
# history merge incorporates history changes from other fish sessions
history merge
builtin history merge
Copy link
Owner

@PatrickF1 PatrickF1 Dec 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we don't want command instead of builtin? Here, we are using the fish provided version of history and command forces us to use that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad--sorry--you are right. History is a builtin and so we want builtin history. Thanks for your PR!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Here is a reference to the builtin docs in case anyone else comes upon this https://fishshell.com/docs/current/cmds/builtin.html

set command_with_ts (
# Reference https://devhints.io/strftime to understand strftime format symbols
history --null --show-time="%m/%e %H:%M:%S | " |
builtin history --null --show-time="%m/%e %H:%M:%S | " |
fzf --read0 --tiebreak=index --query=(commandline)
)

Expand Down