Ich habe fasd lange Zeit ohne Probleme unter macOS verwendet. Ich habe vor kurzem eine Kombination aus Updates von einer alten Version von macOS und einer alten Version von fasd durchgeführt. Nun funktioniert fasd nicht richtig:
eval "$(fasd --init auto)"
wird ohne Fehler ausgeführt und fasd scheint eine Version zu haben. Falls die Datei ~/.fasd
noch nicht existiert, erstellt fasd sie. Aber fasd schreibt nie in diese Datei und sie hat immer eine Größe von 0 Byte.
MacBook-Air:~/$ ls .fasd
ls: .fasd: No such file or directory
MacBook-Air:~/$ fasd --version
1.0.1
MacBook-Air:~/$ cd Downloads
MacBook-Air:Downloads/$ cd
MacBook-Air:~/$ ls .fasd
-rw------- 1 henry staff 0B Aug 23 15:12 .fasd
MacBook-Air:~/$ cd Pictures
MacBook-Air:Pictures/$ cd ..
MacBook-Air:~/$ ls .fasd
-rw------- 1 henry staff 0B Aug 23 15:12 .fasd
Hey, ich würde vorschlagen, weitere Informationen bereitzustellen, wie im Abschnitt Debuggen der README beschrieben. Ihr Problem kann schnell an Leute gerichtet werden, die wissen, wonach sie suchen müssen, aber sie brauchen etwas, um weiterzumachen.
Ich bin auch gespannt, was Sie erhalten, wenn Sie echo $_FASD_RO
ausführen - wenn es sich um einen nicht leeren String handelt, schreibt fasd nicht in seine Datenbank.
Danke für Ihre Antwort! Ich hatte den Abschnitt Debuggen nicht gesehen und wusste nichts von _FASD_SINK
.
Es stellte sich heraus, dass der Schuldige eine veraltete Version von awk war (eigentlich gawk, da ich auf macOS bin).
Ich habe brew upgrade gawk
und fasd
funktioniert jetzt wie erwartet. Danke für deine Hilfe!
MacBook-Air:~/$ cat .fasd.log
fasd -U -V fasd -K _fasd_zsh_cmd_complete -x 'C[-1,-*e] , s[-] n[1,e]' -c - 'c[-1,-A][-1,-D]' -f
fasd_cd -U -V fasd -K _fasd_zsh_cmd_complete -x 'C[-1,-*e] , s[-] n[1,e]' -c - 'c[-1,-A][-1,-D]' -f
COMMAND -c -tn
DEFAULT -f -tn
FIRST
/usr/local/bin/fasd: line 341: -v: command not found
MacBook-Air:~/$ which fasd
/usr/local/bin/fasd
MacBook-Air:~/$ vim /usr/local/bin/fasd
MacBook-Air:~/$ echo $_FASD_AWK
MacBook-Air:~/$ echo $_FASD_AWK
MacBook-Air:~/$ awk
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.4.dylib
Referenced from: /usr/local/bin/awk
Reason: image not found
[1] 59913 abort awk
MacBook-Air:~/$ brew search mpfr
==> Formulae
mpfr ✔
==> Casks
mpfreaker
MacBook-Air:~/$ gawk
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.4.dylib
Referenced from: /usr/local/bin/gawk
Reason: image not found
[1] 61358 abort gawk
MacBook-Air:~/$ brew upgrade gawk
Updating Homebrew...
...
==> Upgrading 1 outdated package, with result:
gawk 4.1.4_1 -> 4.2.1
==> Upgrading gawk
==> Downloading https://homebrew.bintray.com/bottles/gawk-4.2.1.high_sierra.bott
######################################################################## 100.0%
==> Pouring gawk-4.2.1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/gawk/4.2.1: 85 files, 4.7MB
MacBook-Air:~/$ gawk
Usage: gawk [POSIX or GNU style options] -f progfile [--] file ...
Usage: gawk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
...
MacBook-Air:~/$ fasd
MacBook-Air:~/$ vim .fasd.log
MacBook-Air:~/$ awk
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
Usage: awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
...
MacBook-Air:~/$ awk
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
Usage: awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
...
MacBook-Air:~/$ fasd
6 /home/henry/.fasd.log
Danke, ich hatte auch den Fehler line 457: -v: command not found
und die brew upgrade gawk
behoben!
Hilfreichster Kommentar
Danke für Ihre Antwort! Ich hatte den Abschnitt Debuggen nicht gesehen und wusste nichts von
_FASD_SINK
.Es stellte sich heraus, dass der Schuldige eine veraltete Version von awk war (eigentlich gawk, da ich auf macOS bin).
Ich habe
brew upgrade gawk
undfasd
funktioniert jetzt wie erwartet. Danke für deine Hilfe!