Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: fish: atuin dotfiles alias import imports non-alias lines #1953

Open
1 task done
rigrig opened this issue Apr 16, 2024 · 1 comment
Open
1 task done

[Bug]: fish: atuin dotfiles alias import imports non-alias lines #1953

rigrig opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rigrig
Copy link
Contributor

rigrig commented Apr 16, 2024

What did you expect to happen?

I ran atuin dotfiles alias import under fish, and expected it to import (only) my fish aliases.

What happened?

Atuin imported my aliases, and the additional output that my fish generates on startup.

I have a fish script to show a formatted fortune cookie when starting:

> cat ~/.config/fish/conf.d/fortune.fish 
if status is-interactive
        fortune -a | cowsay -f (cowsay -l | tail -n+2 | xargs shuf -en1) | lolcat -t
end

Giving something like this:
image

Atuin seems to have captured those lines as alias:
atuin dotfiles alias list gives

                ||     ||=
                ||----w |=
           (___)\       )\/\=
         \ (ooo)\_______=
        \  ^___^=
 -----------------------------------------=
 _________________________________________=
/ If you permit yourself to read meanings \=
\ 416                                     /=
alias addr 'ip addr show dev enp2s0 | fgrep "inet "'=
... (snip: more aliases)
alias xl 'exa --icons --git --classify --long --header  --group-directories-first  --time-style=long-iso'
|                                         |=
| -- Michael Keith, "The Bar-Code Beast", |=
| The Skeptical Enquirer Vol 12 No 4 p    |=
| conclusion you like.                    |=
| into (rather than drawing meanings out  |=
| of) the evidence, you can draw any      |=

Opening a new terminal now always greets me with

- (line 77): Expected a command, but found '||'
alias                 ||     ||=''
                             ^^
from sourcing file -
        called on line 2 of file ~/.config/fish/conf.d/atuin.fish
from sourcing file ~/.config/fish/conf.d/atuin.fish
        called on line 248 of file /usr/share/fish/config.fish
from sourcing file /usr/share/fish/config.fish
        called during startup
source: Error while reading file '<stdin>'

Atuin doctor output

atuin:
  version: 18.2.0
  sync:
    cloud: false
    records: true
    auto_sync: true
    last_sync: 2024-04-16 10:11:50.497574363 +00:00:00
shell:
  name: fish
  default: unknown
  plugins: []
system:
  os: Linux Mint
  arch: x86_64
  version: '21.3'
  disks:
  - name: /dev/mapper/vgmint-root
    filesystem: ext4
  - name: /dev/sdb5
    filesystem: ext4
  - name: /dev/sdb1
    filesystem: vfat
  - name: /dev/mapper/luks-b22ba9d6-f908-4ce3-a5f5-925344879a4b
    filesystem: ext4

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rigrig rigrig added the bug Something isn't working label Apr 16, 2024
@Alsan
Copy link

Alsan commented Apr 20, 2024

same things happened under zsh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants