Skip to content

Commit 740eccf

Browse files
authored
Add config file path. closes guedesfelipe#72
1 parent f2d324f commit 740eccf

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

pls_cli/please.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,19 @@ def docs():
561561

562562

563563
@app.command(rich_help_panel='Utils and Configs')
564-
def config():
564+
def config(
565+
path: bool = typer.Option(False, "--path", "-p", help="Show config file path")
566+
):
565567
"""Launch config directory :open_file_folder:"""
566-
center_print(Rule('・Opening config directory・', style='#d77dd8'))
567-
typer.launch(Settings().get_full_settings_path(), locate=True)
568+
config_path = Settings().get_config_path()
569+
full_settings_path = Settings().get_full_settings_path()
570+
571+
if not path:
572+
center_print(Rule(f'・[white]Opening config directory ({config_path})[/]・',
573+
style='#d77dd8'))
574+
typer.launch(full_settings_path, locate=True)
575+
else:
576+
console.print(f":open_file_folder: Settings file path: {full_settings_path}")
568577

569578

570579
@app.command()

0 commit comments

Comments
 (0)