Skip to content

[Bug]: Using Nushell with Sqlite history retrieves the wrong history bit #138

Description

@stonkie

What happened?

When Nushell is configured to use Sqlite history instead of plaintext...

$env.config.history.file_format = "sqlite"

It actually stores the command in the history before executing it, as such :

Image

This makes the pay_respects.nu script stumble and suggest fixes for the "f" command itself instead of the previous command.

Using this as line 6 in the pay-respects.nu script fixes it, basically ignoring any f (with trailing whitespaces) commands :

let command = (history | where command !~ '^f\s*$' | last).command

The command and output

Just f

Build information

version: 0.8.8

No similar issue

  • I have searched the issue list and there is no similar issue found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions