.local/bin/fnx: 17: [: unexpected operator
This is what I get right after installing fnx.
❯ fnx
/home/user/.local/bin/fnx: 17: [: unexpected operator
Welcome to Fennel 1.2.1 on PUC Lua 5.3!
Use ,help to see available commands.
Try installing readline via luarocks for a better repl experience.
>>
If I change the shebang in the script from #!/usr/bin/env sh to #!/usr/bin/env bash, I can use fnx.
Anything I can do to provide you more information?
try running file $(which sh) and file $(which bash)
on my system(arch/archcraft) it is symlinked to bash
file $(which sh)
##;; -->/usr/bin/sh: symbolic link to bash
sidenote
bash, when executed as sh will run in a special mode according to the manpage:
If bash is invoked with the name
sh, it tries to mimic the startup behavior of historical versions ofshas closely as possible, while conforming to the POSIX standard as well
$ man bash
on debian/ubuntu, it might be symlinked to debians dash
on some systems it might be installed as its own thing(not symlinked)
if just using #!/usr/bin/env bash works, I dont see much issue with using it like that.