Skip to content

Commit

Permalink
Add config file path. closes guedesfelipe#72
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyraf authored May 21, 2023
1 parent f2d324f commit 740eccf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pls_cli/please.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,19 @@ def docs():


@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()
full_settings_path = Settings().get_full_settings_path()

if not path:
center_print(Rule(f'・[white]Opening config directory ({config_path})[/]・',
style='#d77dd8'))
typer.launch(full_settings_path, locate=True)
else:
console.print(f":open_file_folder: Settings file path: {full_settings_path}")


@app.command()
Expand Down

0 comments on commit 740eccf

Please sign in to comment.