babarot/enhancd

Awk error message whenever changing directories using fish.

g5becks opened this issue ยท 15 comments

What did you expect to happen?
Functionality described on the readme.md

What actually happened?
Normal cd command is used and error is raised.

Output
awk: cannot open /home/beckspoppn/.config/fisher/github.com/b4b4r07/enhancd/lib/step_by_step.awk (No such file or directory)

grzkv commented

Same here.

Again here.

OS: Manjaro Linux x86_64
Fish: 3.1.2

I tracked this to a bug with using fisher.
enhancd.fish sets ENHANCD_ROOT to a subdir of .config while fisher puts the scripts under .cache

The quick fix is to change the line
if ! set -q ENHANCD_ROOT; set -gx ENHANCD_ROOT "$HOME/.config/fisher/github.com/b4b4r07/$name"; end
to
if ! set -q ENHANCD_ROOT; set -gx ENHANCD_ROOT "$HOME/.cache/fisher/github.com/b4b4r07/$name"; end
in enhancd.fish.

Fixed it on my end. If it works for you as well, I'll make a PR

Works for me!

It looks like the cause is this PR jorgebucaran/fisher#571 if you are using fisher

I'm in a virtual ubuntu machine and I'm also getting this: gawk: fatal: can't open source file '/lib/step_by_step.awk' for reading (No such file or directory)
but your fix didn't work since my HOME/.cache doesn't have a fisher folder. I actually can't seem to find the enhancd lib folder anywhere within .config. To me it looks like a lot of depencies aren't installed.

ibeex commented

jorgebucaran/fisher#625 manually creating fixes it

Fixed in 7085570. Please update to the latest enhancd and let us know if you still have any issues. ๐Ÿ‘‹

@ibeex @zoomido @evilhamsterman @crumley @g5becks @MagnusKoudahl

@jorgebucaran Unfortunately, I am still getting the same error after installing today on a fresh arch linux box.

@g5becks Using the latest Fisher to install b4b4r07/enhancd?

@jorgebucaran

I think so, I just install fisher a couple of days ago.

fisher -v
fisher, version 4.1.0

@g5becks Thanks for the info! We're currently tracking this in #141. The PR fixes some errors, but it's still incomplete. Please subscribe there for updates. ๐Ÿ™

b4nst commented

For me it was in ~/.config/fish/fish_variables that ENHANCD_ROOT was set to an incorrect path (/functions/enhancd) fixing it fixed the issue

Still occurs on raspbian

$ cat /etc/os-release                                                                               
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

$ fisher --version
fisher, version 4.3.1

$ fish --version
fish, version 3.1.2

enhancd was installed via fisher fisher install b4b4r07/enhancd
The file ~/.config/fish/fish_variables contains the line SETUVAR --export ENHANCD_ROOT:/home/pi/\x2econfig/fish/functions/enhancd