-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial integration with fortio.org/terminal #120
Conversation
main.go
Outdated
@@ -28,24 +29,34 @@ func Main() int { | |||
compact := flag.Bool("compact", false, "When printing code, use no indentation and most compact form") | |||
showEval := flag.Bool("eval", true, "show eval results") | |||
sharedState := flag.Bool("shared-state", false, "All files share same interpreter state (default is new state for each)") | |||
configDir, err := os.UserConfigDir() // TODO: this is ugly on a mac... allow homedir... | |||
historyFileDefault := filepath.Join(configDir, ".grol_history") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
historyFileDefault := filepath.Join(configDir, ".grol_history") | |
historyFileDefault := filepath.Join(configDir, "grol", "history") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and now I have to mkdir all etc...? isn't it enough to use the config dir and put files there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's dirty. I would prefer if you added a .grol_history file at the root of home folder than creating a file at the root of config folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so I switched back to homedir as default but added GROL_HISTORY_FILE env var for people who don't like it so they don't have to set it in the flag either, does that work?
…e home dir as a virtual '~/' that gets replaced by actual if unchanged from default, so pasting help doesn't leak the home dir
Gets arrow keys and history - integration of several days of work to create https://github.com/fortio/terminal and improve the original golang.org/x/term through golang/term#15 (and in a usable fork while waiting: https://github.com/fortio/term)
Only adds 51k 🎉
Fixes #110