* feat(template): add cmd function to run OS commands from templates
Adds a `cmd` template function that calls env.RunCommand() and
returns trimmed output, enabling users to incorporate arbitrary
command output into any segment template.
Example usage:
{{ cmd "who" | splitList "
" | len }}
{{ cmd "git" "log" "--oneline" "-1" }}
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: restore apm.lock after apm install on session create
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: restore apm.lock after apm install in setup steps
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(template): fix field alignment in exec_test.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs(template): add security warning to cmd helper
Warn that cmd executes arbitrary OS commands as the current user and
should only be used with trusted themes/configs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor(template): rename exec to cmd
Rename exec.go -> cmd.go and exec_test.go -> cmd_test.go to match the
template function name. Also rename TestExec -> TestCmd.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: add github-app.yml
* feat(template): add localeShortDate and localeShortTime functions
resolves#7481
* feat(segment): add FiveHourResetsAt and SevenDayResetsAt template methods
resolves#7480
* docs: fix typo in Wakatime and Brewfather
* perf(git): parallelize git segment shell-outs to reduce prompt latency
* feat(theme): revamp tiwahu theme segments and styling
Squash recent tiwahu theme updates into a single commit for PR review.\n\nIncludes git segment refinements, language segment styling updates, docker segment additions, and az template fix.
* fix(template): add //go:build windows constraint to locale_windows.go
Without this tag both locale_unix.go and locale_windows.go were compiled
on non-Windows platforms, causing the Windows init() to override the Unix
resolver and leaving localeShortDate/Time always at their defaults.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Shubham Bawari <shubhambawari123@gmail.com>
Co-authored-by: Matthew Rothenberg <mroth@mroth.xyz>
Co-authored-by: Tim Huber <thuber@tiwahu.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>