Skip to content

no "installer" experience out of the box, just "failed to load config" errors #771

@Dieterbe

Description

@Dieterbe

the docs at https://github.com/cheat/cheat/blob/master/INSTALLING.md#configuring claim:

 Three things must be done before you can use cheat:

    A config file must be generated
    [cheatpaths](https://github.com/cheat/cheat/blob/master/README.md#cheatpaths) must be configured
    [Community cheatsheets](https://github.com/cheat/cheatsheets/) must be downloaded

On first run, cheat will run an installer that will do all of the above automatically. After the installer is complete, it is strongly advised that you view the configuration file that was generated, as you may want to change some of its default values (to enable colorization, change the paginator, etc).

FWIW, when i installed the app (version 4.4.2) and ran it for the first time, no installer ran.
instead, it showed a help/usage menu which had init instructions. i followed those (which deployed a config file). After that, it just keeps erroring, it doesn't help with installing the community cheatsheets.
See output below. it's especially weird because /home/dieter/.config/cheat contains just the config file, but it's complaining about symlinks. There are no symlinks in that directory.

~/c/open-source-term ❯❯❯ cheat
Usage:
  cheat [options] [<cheatsheet>]

Options:
  --init                  Write a default config file to stdout
  -a --all                Search among all cheatpaths
  -c --colorize           Colorize output
  -d --directories        List cheatsheet directories
  -e --edit=<cheatsheet>  Edit <cheatsheet>
  -l --list               List cheatsheets
  -p --path=<name>        Return only sheets found on cheatpath <name>
  -r --regex              Treat search <phrase> as a regex
  -s --search=<phrase>    Search cheatsheets for <phrase>
  -t --tag=<tag>          Return only sheets matching <tag>
  -T --tags               List all tags in use
  -v --version            Print the version number
  --rm=<cheatsheet>       Remove (delete) <cheatsheet>
  --conf                  Display the config file path

Examples:

  To initialize a config file:
    mkdir -p ~/.config/cheat && cheat --init > ~/.config/cheat/conf.yml

  To view the tar cheatsheet:
    cheat tar

  To edit (or create) the foo cheatsheet:
    cheat -e foo

  To edit (or create) the foo/bar cheatsheet on the "work" cheatpath:
    cheat -p work -e foo/bar

  To view all cheatsheet directories:
    cheat -d

  To list all available cheatsheets:
    cheat -l

  To list all cheatsheets whose titles match "apt":
    cheat -l apt

  To list all tags in use:
    cheat -T

  To list available cheatsheets that are tagged as "personal":
    cheat -l -t personal

  To search for "ssh" among all cheatsheets, and colorize matches:
    cheat -c -s ssh

  To search (by regex) for cheatsheets that contain an IP address:
    cheat -c -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'

  To remove (delete) the foo/bar cheatsheet:
    cheat --rm foo/bar

  To view the configuration file path:
    cheat --conf
~/c/open-source-term ❯❯❯ mkdir -p ~/.config/cheat && cheat --init > ~/.config/cheat/conf.yml
~/c/open-source-term ❯❯❯ vim ~/.config/cheat/conf.yml
~/c/open-source-term ❯❯❯ cheat tar
failed to load config: failed to resolve symlink: /home/dieter/.config/cheat/cheatsheets/community: lstat /home/dieter/.config/cheat/cheatsheets: no such file or directory
~/c/open-source-term ❯❯❯ cheat -l                                                                    ✘ 1 
failed to load config: failed to resolve symlink: /home/dieter/.config/cheat/cheatsheets/community: lstat /home/dieter/.config/cheat/cheatsheets: no such file or directory
~/c/open-source-term ❯❯❯                                                                             ✘ 1 
~/c/open-source-term ❯❯❯ cheat                                                                     ✘ 130 
failed to load config: failed to resolve symlink: /home/dieter/.config/cheat/cheatsheets/community: lstat /home/dieter/.config/cheat/cheatsheets: no such file or directory
~/c/open-source-term ❯❯❯                                                                             ✘ 1 
~/c/open-source-term ❯❯❯ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions