mirror of
https://github.com/miguelmota/cointop
synced 2024-11-05 00:00:14 +00:00
update readme
This commit is contained in:
parent
22d551b3b4
commit
b91ef2944a
@ -414,6 +414,12 @@ defaultView = "default"
|
||||
v = "sort_column_24h_volume"
|
||||
```
|
||||
|
||||
You may specify a different config file to use by using the `-config` flag:
|
||||
|
||||
```bash
|
||||
cointop -config="/path/to/config"
|
||||
```
|
||||
|
||||
## List of actions
|
||||
|
||||
This are the action keywords you may use in the config file to change what the shortcut keys do.
|
||||
|
@ -100,6 +100,8 @@ type Config struct {
|
||||
ConfigFilepath string
|
||||
}
|
||||
|
||||
var defaultConfigPath = "~/.cointop/config"
|
||||
|
||||
// NewCointop initializes cointop
|
||||
func NewCointop(config *Config) *Cointop {
|
||||
var debug bool
|
||||
@ -107,7 +109,7 @@ func NewCointop(config *Config) *Cointop {
|
||||
debug = true
|
||||
}
|
||||
|
||||
configFilepath := "~/.cointop/config"
|
||||
configFilepath := defaultConfigPath
|
||||
if config != nil {
|
||||
if config.ConfigFilepath != "" {
|
||||
configFilepath = config.ConfigFilepath
|
||||
@ -275,9 +277,8 @@ func Clean() {
|
||||
func Reset() {
|
||||
Clean()
|
||||
|
||||
homedir := userHomeDir()
|
||||
// default config path
|
||||
configPath := fmt.Sprintf("%s%s", homedir, "/.cointop")
|
||||
configPath := fmt.Sprintf("%s%s", userHomeDir(), "/.cointop")
|
||||
if _, err := os.Stat(configPath); !os.IsNotExist(err) {
|
||||
fmt.Printf("removing %s\n", configPath)
|
||||
if err := os.RemoveAll(configPath); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user