Direnv: fish: Expected end of the statement, but instead found end of the input

Created on 30 Dec 2020  路  7Comments  路  Source: direnv/direnv

Describe the bug
eval (direnv hook fish) produces an error on fish

To Reproduce
Steps to reproduce the behavior:
Run eval (direnv hook fish) with version 2.26.0 direnv.

Error: fish: Expected end of the statement, but instead found end of the input

Expected behavior
No error

Environment

  • OS: [e.g. macOS Mojave, Ubuntu 18.04, ...] Mac Os 11.1
  • Shell: [e.g. bash, zsh, ...] fish 3.1.2
  • Direnv version [e.g. 2.20.0] 2.26.0

Additional context
Add any other context about the problem here.

Bug

Most helpful comment

Seems like the command now is

direnv hook fish | source

according to man direnv.

All 7 comments

I just update my Manjaro (linux based on Archlinux), and I have the same problem.
It broke all my dev env. It is really painful.

Seems like the command now is

direnv hook fish | source

according to man direnv.

thx @ruslandoga, it works perfectly.

I had the same problem and using direnv hook fish | source fixed it. Maybe this change should be mentioned in the GitHub release notes and CHANGELOG.md.

/cc @wderezin

I tracked down the issue and will push a PR shortly to maintain backward compatibility. The issue was eval not handling the comments I added.

I am cutting a new release right now. Unfortunately, I was also doing a bit of cleanup in master which changes how things are packaged, so it might take a bit longer for package managers to update to this release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fschuindt picture fschuindt  路  3Comments

jandudulski picture jandudulski  路  3Comments

btruhand picture btruhand  路  5Comments

taylorzr picture taylorzr  路  5Comments

Thomazella picture Thomazella  路  8Comments