Skip to content

Add config file path. #74

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions pls_cli/please.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,27 @@


@app.command(rich_help_panel='Utils and Configs')
def config():
def config(
path: bool = typer.Option(
False, '--path', '-p', help='Show config file path'
)
):
"""Launch config directory :open_file_folder:"""
center_print(Rule('・Opening config directory・', style='#d77dd8'))
typer.launch(Settings().get_full_settings_path(), locate=True)
config_path = Settings().get_config_path()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command can stay within the scope where it is used.

Line 573

full_settings_path = Settings().get_full_settings_path()

Check warning on line 571 in pls_cli/please.py

View check run for this annotation

Codecov / codecov/patch

pls_cli/please.py#L570-L571

Added lines #L570 - L571 were not covered by tests

if not path:
center_print(

Check warning on line 574 in pls_cli/please.py

View check run for this annotation

Codecov / codecov/patch

pls_cli/please.py#L573-L574

Added lines #L573 - L574 were not covered by tests
Rule(
f'・[white]Opening config directory ({config_path})[/]・',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove fixed styling in code?

[white][/]

style='#d77dd8',
)
)
typer.launch(full_settings_path, locate=True)

Check warning on line 580 in pls_cli/please.py

View check run for this annotation

Codecov / codecov/patch

pls_cli/please.py#L580

Added line #L580 was not covered by tests
else:
console.print(

Check warning on line 582 in pls_cli/please.py

View check run for this annotation

Codecov / codecov/patch

pls_cli/please.py#L582

Added line #L582 was not covered by tests
f':open_file_folder: Settings file path: {full_settings_path}'
)


@app.command()
Expand Down