Open victorhooi opened 4 weeks ago
That's pretty weird.
What's the contents of your fish config file (~./config/fish/config.fish
) ? Is it a symlink into the nix store ?
Also, show us your PATH environment variable value.
@r-vdp Here's my fish config:
❯ cat ~/.config/fish/config.fish
fish: Unknown command: atuin
- (line 1):
atuin history start -- "$argv[1]"
^~~~^
in command substitution
called on line 6 of file -
in function '_atuin_preexec' with arguments 'cat\ \~/.config/fish/config.fish\ '
in event handler: handler for generic event “fish_preexec”
- (line 6): Unknown command
set -g ATUIN_HISTORY_ID (atuin history start -- "$argv[1]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_atuin_preexec' with arguments 'cat\ \~/.config/fish/config.fish\ '
in event handler: handler for generic event “fish_preexec”
# ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated
# automatically by home-manager.
# Only execute this file once per shell.
set -q __fish_home_manager_config_sourced; and exit
set -g __fish_home_manager_config_sourced 1
source /nix/store/jwylbkjka0fspxkhic2vri072ic17mia-hm-session-vars.fish
status is-login; and begin
# Login shell initialisation
end
status is-interactive; and begin
# Abbreviations
# Aliases
# Interactive shell initialisation
if test "$TERM" != dumb
eval (/Users/foo/.nix-profile/bin/starship init fish)
end
# add completions generated by Home Manager to $fish_complete_path
begin
set -l joined (string join " " $fish_complete_path)
set -l prev_joined (string replace --regex "[^\s]*generated_completions.*" "" $joined)
set -l post_joined (string replace $prev_joined "" $joined)
set -l prev (string split " " (string trim $prev_joined))
set -l post (string split " " (string trim $post_joined))
set fish_complete_path $prev "/Users/foo/.local/share/fish/home-manager_generated_completions" $post
end
/nix/store/y28f4m9ghwans8i6i7p31p1n7h9fl7dk-atuin-18.2.0/bin/atuin init fish | source
end
~/code/csv_playground is 📦 v0.1.0 via 🐍 v3.9.6
And yes, from what I can see - the config file is a symlink:
❯ ls -lah ~/.config/fish/
fish: Unknown command: atuin
- (line 1):
atuin history start -- "$argv[1]"
^~~~^
in command substitution
called on line 6 of file -
in function '_atuin_preexec' with arguments 'ls\ -lah\ \~/.config/fish/'
in event handler: handler for generic event “fish_preexec”
- (line 6): Unknown command
set -g ATUIN_HISTORY_ID (atuin history start -- "$argv[1]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_atuin_preexec' with arguments 'ls\ -lah\ \~/.config/fish/'
in event handler: handler for generic event “fish_preexec”
total 8
drwx------ 7 foo staff 224B Jun 3 12:40 ./
drwxr-xr-x 7 foo staff 224B Jun 3 12:28 ../
drwxr-xr-x 2 foo staff 64B May 28 13:42 completions/
drwxr-xr-x 2 foo staff 64B May 28 13:42 conf.d/
lrwxr-xr-x 1 foo staff 87B Jun 3 12:40 config.fish@ -> /nix/store/f2m99aq3y5xji83kn072dmdwn1pzr2p0-home-manager-files/.config/fish/config.fish
-rw-r--r-- 1 foo staff 1.3K May 28 13:42 fish_variables
drwxr-xr-x 2 foo staff 64B May 28 13:42 functions/
@dawidd6 Here's my path under the Fish shell:
❯ env | grep PATH
fish: Unknown command: atuin
- (line 1):
atuin history start -- "$argv[1]"
^~~~^
in command substitution
called on line 6 of file -
in function '_atuin_preexec' with arguments 'env\ \|\ grep\ PATH'
in event handler: handler for generic event “fish_preexec”
- (line 6): Unknown command
set -g ATUIN_HISTORY_ID (atuin history start -- "$argv[1]")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_atuin_preexec' with arguments 'env\ \|\ grep\ PATH'
in event handler: handler for generic event “fish_preexec”
PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/sbin:/opt/puppetlabs/bin
Here's my path if I spawn a bash shell:
bash-3.2$ env | grep PATH
PATH=/Users/foo/.local/share/bin:/Users/foo/.npm-packages/bin:/Users/foo/bin:/Users/foo/.pnpm-packages/bin:/Users/foo/.pnpm-packages:/Users/foo/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/sbin:/opt/puppetlabs/bin
and for zsh:
❯ env | grep PATH
PATH=/Users/foo/.local/share/bin:/Users/foo/.npm-packages/bin:/Users/foo/bin:/Users/foo/.pnpm-packages/bin:/Users/foo/.pnpm-packages:/Users/foo/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/sbin:/opt/puppetlabs/bin
It does seem slightly different - not sure why?
Are you following the right branch?
Is there an existing issue for this?
Issue description
I'm using this template as my starter for nix on my macOS system. Still learning a bit, so sorry if I'm not doing this the right way.
I've enabled both atuin and fish through my home-manager.nix file as follows:
I didn't see anything in home-manager to set the default shell. Hence I added the fish shell to /etc/shells (it wasn't in there previously):
And I also ran chsh to set it to fish:
However, when I spawn a new shell (now with fish as the default shell) I get the following error:
It seems to be some kind of path issue - but I'm not sure why it's happening, or if I've enabled atuin/fish the "correct' way for home-manager/nix.
Maintainer CC
@r-vdp @emilazy
System information