Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

feat: Add --cleanup command-line option#3

Open
google-labs-jules[bot] wants to merge 1 commit intomaster from
feature/cleanup-command
Open

feat: Add --cleanup command-line option #3
google-labs-jules[bot] wants to merge 1 commit intomaster from
feature/cleanup-command

Conversation

@google-labs-jules
Copy link
Contributor

@google-labs-jules google-labs-jules bot commented Aug 14, 2025

This change adds a new --cleanup command-line option to the pathman tool. When this flag is used, the tool will non-interactively remove non-existent and duplicate paths from the specified environment variable and update it without launching the interactive editor.

This commit introduces a new `--cleanup` flag to the `pathman` tool.
When this option is provided on the command line, the tool will
automatically perform a cleanup of the specified environment variable.
The cleanup process consists of two steps:
1. Removing any paths that no longer exist on the filesystem.
2. Removing any duplicate path entries.
After cleaning, the tool updates the environment variable with the new,
cleaned-up value and exits. This entire process is non-interactive
and does not launch the TUI, making it suitable for use in scripts.
To implement this, the `remove_dups` and `remove_nonexistent`
functions in the `editor` module have been made public so they can be
called from `main.rs`.
@eminence eminence marked this pull request as ready for review August 20, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

0 participants

AltStyle によって変換されたページ (->オリジナル) /