dhall-haskell icon indicating copy to clipboard operation
dhall-haskell copied to clipboard

[dhall-to-json] Pressing tab for autocompletion prints `bash: line 1: compgen: command not found`

Open mainrs opened this issue 3 years ago • 4 comments

This is probably due to me running fish as my user shell. I couldn't find the relevant code for the error inside of dhall-json though.

mainrs avatar Jan 12 '22 10:01 mainrs

How did you install dhall-to-json?

Gabriella439 avatar Jan 12 '22 16:01 Gabriella439

From nixpkgs using the dhall-json package. I used home manager, so it went into home.packages.

mainrs avatar Jan 12 '22 17:01 mainrs

I tried to reproduce using dhall-json-1.7.7 inside of a fish shell (both obtained from Nixpkgs) but I was unable to reproduce the problem and the auto-completion worked correctly for me

Gabriella439 avatar Jan 14 '22 01:01 Gabriella439

I have a similar issue on my machine and I figured out a simple way to reproduce it.

I use the bash package that comes with Debian and dhall is installed via nix. The issue occurs when a non-interactive bash is present in the PATH, which is the case for some reason in some of our flakes development environments.

To reproduce, I can start a shell with nix shell nixpkgs#{bash,dhall} and then try to get a completion after dhall --file .

PS: There are a bunch of issues related to this on nix, ie. 6091. PPS: In our case, the workaround is to include nixpkgs' bashInteractive in the flake's development environment.

maxime-didier avatar May 09 '23 09:05 maxime-didier