cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.75k stars 176 forks source link

Bug in mcfly.fish #406

Closed manfredlotz closed 1 month ago

manfredlotz commented 2 months ago

I am using mcfly 0.8.4

mcfly.fish here in the repository and so mcfly init fish output is buggy.

here

...
 function __mcfly_add_command -d 'Add run commands to McFly database' -e fish_postexec
    # Check for the private mode
    test -n "$fish_private_mode"; and return
    # Retain return code of last command before we lose it
    set -l last_status $status
...

the value of last_status is always 1. Reason is that set -l last_status $status is not the first statemen in function __mcfly_add_command

cantino commented 2 months ago

I don't use fish but I'm open to a PR to fix this.

manfredlotz commented 2 months ago

Ok, will do. Plan for coming weekend when I will have more time doing things.

4t8dd commented 1 month ago

just swapping the first two line will fix this issue.

manfredlotz commented 1 month ago

@4t8dd Yes, that is what I mentioned above and what I did.

cantino commented 1 month ago

Fixed in https://github.com/cantino/mcfly/pull/414