jhspetersson / fselect

Find files with SQL-like queries
https://fselect.rocks
Apache License 2.0
4.01k stars 85 forks source link

[MacOS | homebrew | 0.8.6] Error after update from 0.8.5: TOML parse error missing field `is_font` #152

Open dangnhdev opened 4 months ago

dangnhdev commented 4 months ago

Terminal output:

fselect
TOML parse error at line 1, column 1
  |
1 | no_color = false
  | ^^^^^^^^^^^^^^^^
missing field `is_font`

Tried to find config.toml at ~/.config/fselect as in the doc but the folder doesn't exist. May I ask where is the location of config.toml on Mac (installed via homebrew)? Update: There is argument for setting config file location as well but I can't find any example .toml file in this project to copy from 😔

The fselect command still show result and in the mean time I just cut first 6 lines from its stderr to temporary use it:

fselect path, is_dir where "(name != '*.md' and is_dir = false) or (is_dir and name = '.*')" order by is_dir 2>&1 | tail -n +6
jeff-arnold commented 3 months ago

Environment: Mac OS X 12.7.5, fselect 0.8.6 installed via MacPorts

I was seeing the same error message.

The fselect config.toml file is found at ~/Library/Application\ Support/jhspetersson.fselect/config.toml.

The last line in that file was

is_fond = [".eot", ".fon", ".otc", ".otf", ".ttc", ".ttf", ".woff", ".woff2"]

with no newline at the end of the file.

I changed "is_fond" to "is_font" and added a newline and the error has gone away.

I don't know where this file comes from. It doesn't appear to be provided by the MacPorts fselect package.

JonathanDoughty commented 3 weeks ago

I can confirm that adding the is_font definition to ~/Library/Application\ Support/jhspetersson.fselect/config.toml - which was entirely missing in my macOS brew installation - was successful in eliminating the TOML parse error issue for me.