Skip to content

can't change editor via env vars #589

@caleb15

Description

@caleb15

Thanks for submitting a bug report. Please provide the following information:

A description of the problem
I'm not able to change the editor cheat uses via env vars

cheat version info
4.0.4

(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» EDITOR=code                                                                    [19:06:32]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:06:40]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export EDITOR=code                                                             [19:06:43]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:06:48]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export EDITOR=nano                                                             [19:06:50]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:07:15]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export VISUAL=code                                                             [19:07:17]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:07:45]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export VISUAL=nano                                                             [19:07:46]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:07:52]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export CHEAT_EDITOR=nano                                                       [19:07:54]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:09:17]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» export CHEAT_EDITOR=code                                                       [19:09:19]
(fifteen5) caleb•~/Documents/fifteen5(dev⚡)» cheat -e tree                                                                  [19:09:23]
failed to edit cheatsheet: exec: "vim": executable file not found in $PATH

From the comment here it looks like it should be supported, or at least it used to be in the past.

As a workaround I was able to change the editor by changing ~/.config/cheat/conf.yml

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions