Another demo showing the config matching via the toggl config active command
Try running toggl config for various macros and shell commands.
Sample complex configuration with a bunch of shell expansions
['*']
description = "π¨ {{branch}} / {{current_dir}}"
project = "{{parent_base_dir}}"
billable = true
['alt']
description = "chore(release)"
project = "{{base_dir}}"
tags = ["release", "{{parent_dir}}"]
billable = false
# Match all branches that start with a number and a slash
# e.g. 1234/feature-branch
['^\d+/.*']
description = "π¨ {{branch}}"
project = "{{parent_dir}}/{{base_dir}}"
# Set task to android if the current directory contains "android"
# otherwise set it to iOS
task = """
{{$if [[ "$PWD" == *"android"* ]]; then echo "Android"; else echo "iOS"; fi}}
"""
# Set tags to the current year
tags = ["code", "{{$ date +\"%Y\" }}"]
billable = true
New commands introduced
# Get active tracking configuration for current directory and branch
$ toggl config active
:memo: Links to relevant issues/docs
See #45 which defines the marcro expansion mechanism.
:speech_balloon: Summarise how you feel about this PR with a gif/image
:star2: What does this PR do?
toggl config active
:bug: Recommendations for testing
toggl config active
commandtoggl config
for various macros and shell commands.New commands introduced
:memo: Links to relevant issues/docs
See #45 which defines the marcro expansion mechanism.
:speech_balloon: Summarise how you feel about this PR with a gif/image