Skip to content

Commit

Permalink
📝 Add document about wakatime
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 3, 2023
1 parent 7ba2b9c commit da9abb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ prompt.prompts = { prompt_style.generate_ps1(), " " }

## Customization

By default, It uses the base name of current working directory as your project
name. You can call `(require "prompt-style").wakatime("wakatime-cli XXX")` to
customize it.

See
[![readthedocs](https://shields.io/readthedocs/prompt-stylelua)](https://prompt-stylelua.readthedocs.io).

Expand Down
4 changes: 2 additions & 2 deletions prompt-style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if table.unpack == nil then table.unpack = unpack end
---@param cmd string
---@return string
local function wakatime(cmd)
cmd = cmd or "wakatime-cli --write --plugin=repl-lua-wakatime --entity-type=app \
--entity=lua --alternate-language=lua --project=%s"
cmd = cmd or "wakatime-cli --write --plugin=repl-lua-wakatime \
--entity-type=app entity=lua --alternate-language=lua --project=%s"
local s, _ = string.find(cmd, "%s")
if s ~= nil then
cmd = string.format(cmd,
Expand Down

0 comments on commit da9abb3

Please sign in to comment.