diff --git a/README.md b/README.md index ce3200d..2e3cb78 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,16 @@ A simple, customizable [pomodoro](https://en.wikipedia.org/wiki/Pomodoro_Techniq ### Commands -- `:TimerStart TIMELIMIT [NAME]` to start a new timer. For example, `:TimerStart 25m Work` to start a timer for 25 minutes called "Work". Currently the time limit can only be specified in hours, minutes, or seconds, such as `10m` for "10 minutes" or `10s` for "10 seconds". +- `:TimerStart TIMELIMIT [NAME]` to start a new timer. + + The time limit can be specified in hours, minutes, seconds, or a combination of those, and *shouldn't include any spaces*. For example: + + - `:TimerStart 25m Work` to start a timer for 25 minutes called "Work". + - `:TimerStart 10s` to start a timer for 10 seconds. + - `:TimerStart 1h30m` to start a timer for an hour and a half. + + pomo.nvim will recognize multiple forms of the time units, such as "m", "min", "minute", or "minutes" for minutes. + - `:TimerStop [TIMERID]` to stop a running timer, e.g. `:TimerStop 1`. If no ID is given, the latest timer is stopped. ## Setup diff --git a/lua/pomo/commands.lua b/lua/pomo/commands.lua index b538171..8c15079 100644 --- a/lua/pomo/commands.lua +++ b/lua/pomo/commands.lua @@ -7,7 +7,7 @@ local M = {} M.register_commands = function() vim.api.nvim_create_user_command("TimerStart", function(data) if data.fargs == nil or #data.fargs == 0 or #data.fargs > 2 then - return log.error "Invalid arguments.\nUsage: TimerStart TIMELIMIT [NAME]" + return log.error "Invalid number arguments, expected 2.\nUsage: TimerStart TIMELIMIT [NAME]" end local time_arg = string.lower(data.fargs[1])