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

Gargantuan refactor #522

Merged
merged 2 commits into from
Nov 10, 2019
Merged

Gargantuan refactor #522

merged 2 commits into from
Nov 10, 2019

Conversation

casey
Copy link
Owner

@casey casey commented Nov 10, 2019

  • Instead of changing the current directory with env::set_current_dir
    to be implicitly inherited by subprocesses, we now use
    Command::current_dir to set it explicitly. This feels much better,
    since we aren't dependent on the implicit state of the process's
    current directory.

  • Subcommand execution is much improved.

  • Added a ton of tests for config parsing, config execution, working
    dir, and search dir.

  • Error messages are improved. Many more will be colored.

  • The Config is now onwed, instead of borrowing from the arguments and
    the clap::ArgMatches object. This is a huge ergonomic improvement,
    especially in tests, and I don't think anyone will notice.

  • --edit now uses $VISUAL, $EDITOR, or vim, in that order,
    matching git, which I think is what most people will expect.

  • Added a cute tmptree!{} macro, for creating temporary directories
    populated with directories and files for tests.

  • Admitted that grammer is LL(k) and I don't know what k is.

Fixes #485.

@casey casey force-pushed the gargantuan-refactor branch 4 times, most recently from 5c50ff4 to dc6c264 Compare November 10, 2019 05:09
- Instead of changing the current directory with `env::set_current_dir`
  to be implicitly inherited by subprocesses, we now use
  `Command::current_dir` to set it explicitly. This feels much better,
  since we aren't dependent on the implicit state of the process's
  current directory.

- Subcommand execution is much improved.

- Added a ton of tests for config parsing, config execution, working
  dir, and search dir.

- Error messages are improved. Many more will be colored.

- The Config is now onwed, instead of borrowing from the arguments and
  the `clap::ArgMatches` object. This is a huge ergonomic improvement,
  especially in tests, and I don't think anyone will notice.

- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
  matching git, which I think is what most people will expect.

- Added a cute `tmptree!{}` macro, for creating temporary directories
  populated with directories and files for tests.

- Admitted that grammer is LL(k) and I don't know what `k` is.
@casey casey merged commit aefdcea into master Nov 10, 2019
@casey casey deleted the gargantuan-refactor branch November 10, 2019 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid changing the current working directory
1 participant