Skip to content

history --merge does not merge history in chronological order #2312

@brettanomyces

Description

@brettanomyces

Expected result: After history --merge commands in history should be shown in chronological order by the history command

Actual result: merged commands are shown after commands from the current session.

To reproduce:
Add save.fish to ~/.config/fish/functions

function save
    echo "- cmd:" $argv >> ~/.config/fish/fish_history
    echo "  when:" (date "+%s") >> ~/.config/fish/fish_history
    history --merge
end

Open a new shell and type the following

ls
save test
history

test appears below ls in the history, e.g.

save test
ls
test
...

fish, version 2.2.0-118-gaee71b5

Metadata

Metadata

Labels

bugSomething that's not working as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions