Skip to content
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

molt_shell::repl configuration #89

Open
wduquette opened this issue Feb 15, 2020 · 1 comment
Open

molt_shell::repl configuration #89

wduquette opened this issue Feb 15, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wduquette
Copy link
Owner

The molt_shell::repl should support loading user configuration from something like a .moltrc file. Since the intent of Molt is that different applications have their own shells, the name and location of this file should be determined by the builder of the shell; but the standard Molt shell should use ${XDG_CONFIG_HOME}/molt/config.tcl, defaulting to ~/.config/molt/config.tcl, consistent with the XDG Base Directory Specification.

molt_shell::repl should load this file at startup. Errors should be handled as by TCL 8.6: the error message is output prior to the first prompt.

@wduquette wduquette added enhancement New feature or request good first issue Good for newcomers labels Feb 15, 2020
@wduquette
Copy link
Owner Author

Notes:

  • Rust does not provide "~" expansion by default.
  • The shellexpand crate provides both "~" and environment variable expansion in directory paths, using the dirs crate for the heavy lifting, and could make this much easier.
    • But, eventually we may want to support "~" expansion in the main Molt crate for Molt's "file" commands (or in some ancillary crate for that purpose); I'm reluctant to accept these as a dependency until that's resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

1 participant