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

Closed
brettanomyces opened this Issue Aug 18, 2015 · 1 comment

Projects

None yet

4 participants

@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

@ridiculousfish
Member

Finally fixed this. Thanks for reporting it!

@zanchey zanchey added this to the next-2.x milestone Jul 3, 2016
@floam floam added a commit to floam/fish-shell that referenced this issue Jul 4, 2016
@ridiculousfish @floam ridiculousfish + floam history --merge to properly interleave items
Fixes #2312
28f2835
@krader1961 krader1961 modified the milestone: fish 2.4.0, next-2.x Sep 3, 2016
@krader1961 krader1961 added the bug label Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment