Skip to content

[BUG]: Pressing up arrow sometimes brings next-to-last command instead of the last one #953

Closed

Description

@ivxvm

Describe the Bug

Lets say my last command is "ls ~/.config", and the one before it is "pwd". When I press up it sometimes fills the current command with "pwd" instead of "ls ~/.config". Most of the time it works correctly and fills it with "ls ~/.config". I'm not sure of the exact conditions when this happens.

Environment & Version Information

~ $ flyline version --copy
flyline 1.3.0
git hash: f9b16a8
build mode: release
build datetime: 2026-07-05T20:54:48Z
build target: x86_64-unknown-linux-gnu
rustc version: rustc 1.96.1 (31fca3adb 2026-06-26)

Running in: Bash 5.3.9(1)-release
shell: /bin/bash

Running in: xterm-256color
program: WezTerm
program version: 20260616-002039-40daec8-gentoo
locale: en_US.UTF-8 (LC_ALL: unknown, LC_CTYPE: unknown)

Running in: Gentoo Linux (kernel 6.18.41-gentoo-dist-bin x86_64)
system linker: unknown
dynamic linker: ldd (Gentoo 2.43-r2 (patchset 3)) 2.43

Running on: AMD Ryzen 7 5800H with Radeon Graphics (16 cores)

Running in: a simulation

Debug Logs (Optional / If Necessary)

Click to expand logs
<paste logs here>

Steps to Reproduce

  1. Open terminal
  2. Press up
  3. See error (not the last command, but next-to-last appears)

Activity

  1. added
    bug
    on Aug 19, 2026
  2. ivxvm commented on Aug 19, 2026

    @ivxvm
    Author

    Woops, I just noticed how old this version is. I'll update flyline and check with new version.

  3. ivxvm commented on Aug 19, 2026

    @ivxvm
    Author

    So with latest version, history seems to work very weird still. Lets say I open terminal, I press up, I get "zoxide /mnt/Expansion/Pictures/random", I type "ls ~/.config", press enter. I close terminal, open terminal again, press up. I still get "zoxide /mnt/Expansion/Pictures/random" for some reason, when the last command is clearly "ls ~/.config".

    Another weirdness:
    I open terminal, I press up, I get "zoxide /mnt/Expansion/Pictures/random", I press down, I get empty. I press up again and I get "zoxide --help" for some reason.

  4. HalFrgrd commented on Aug 19, 2026

    @HalFrgrd
    Owner

    Thanks for the bug report! I've been refactoring the history stuff and caused the first bug. But the second bug has been around dormant for a while!

  5. added a commit that references this issue on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions