watercooler-labs / toggl-cli

🕐 Command Line App for Toggl Track
MIT License
31 stars 7 forks source link

Add flag to use different base directory #65

Closed shantanuraj closed 1 year ago

shantanuraj commented 1 year ago

Describe the issue

I'd like to have the ability to run the subcommands with a custom directory as the context.

# This should report the active config for the toggl-cli directory
toggl -C ~/dev/watercooler-labs/toggl-cli config --active

# This should start a time entry, using the defaults for podcst-web directory
toggl -C ~/dev/shantanuraj/podcst-web start

Affected commands

toggl config
toggl start

Suggestion

Add a global -C flag similar to git and tar

Allow switching "present directory" while executing the program.

Fail command if provided argument is not a directory or not accessible.