haslersn / any-nix-shell

fish and zsh support for the nix run and nix-shell environments of the Nix package manager
MIT License
253 stars 17 forks source link

shellHook not working properly #27

Open iogrt opened 1 year ago

iogrt commented 1 year ago

I'm not able to call functions, alias, etc defined in shellHook. Example:

mkShell {
  shellHook = ''
   alias e="echo"
'';
}

Result:

e: command not found
mastarija commented 1 year ago

I also have this problem. Any known workaround or a solution?

iogrt commented 1 year ago

My daily workaround is launching bash and nix-shell'ing inside it... not ideal at all

dscottboggs commented 1 year ago

Shell hooks work, they just run in bash before your shell is launched. Not sure how that can be fixed just thought I'd offer some clarification.