Making the ugo command smarter (i.e. making `ugo 1,234` work)

  • 8 March 2021
  • 1 reply
  • 27 views

Badge

Currently ugo 1,234 gives an error as you should use ugo time 1,234. Anecdotal evidence shows that even experienced users often forget to spell the full command.
It would be possible to make the ugo command smarter when it can infer what the user meant, so ugo 1,234 would be treated as ugo time 1,234 and ugo my-bookmark-name as ugo bookmark my-bookmark-name.


To make this work properly we would also need to modify other commands to be more helpful. For instance, if you use ubookmark start to create a bookmark called start, then the command could warn you that you will have to use the full ugo bookmark start form to avoid ambiguity with the ugo start command. (Details on how this would work are still undecided.)

What do you think of this change?


1 reply

Badge +1

ubookmark without an argument assigns the bookmark a number. This will
need changing otherwise ugo might confuse the two and give unexpected
results.

I agree that start, end, and a few others should be tagged as “special words”
and banned from the pool of allowed names for bookmarks.

Reply