Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readline support for sheet names #53

Closed
vlcinsky opened this issue Nov 13, 2012 · 3 comments
Closed

Readline support for sheet names #53

vlcinsky opened this issue Nov 13, 2012 · 3 comments

Comments

@vlcinsky
Copy link

Using git inside bash offers awesome tab-completion for branch names, command options etc.

It would be great if this could be implemented for TimeTrap too.

Initial implementation could support just sheet names - then if I would tab-complete my sheet name, I would know, it is properly spelled.

Implementation wold have to be probably optional as some environments do not have ti provide readline functionality easily or by default.

Archived sheets should not be tab-completed.

I keep intentionaly other readline related ideas out of this issue to make it easier to complete.

@vlcinsky
Copy link
Author

disclaimer: I am not bash/ruby/readline expert.

When researching pandoc, I found autocompletion bash script for it: https://github.com/dsanson/pandoc-completion/blob/master/pandoc-completion.bash

And here are some ideas:

  • having such a script does not seem too complex. Not portable to Windows, but at least some start.
  • I can imagine even writing sheet names into such a script, this quick hack would allow quick results. Having it driven by an external (yaml?) configuration would be of course better.
  • theoretically, sheet names could be read out from existing sqlite database file, where are all the records. However, this I do not see necessary, it can be even dangerous, asi it can become sometime too slow. Comparing to yaml configuration file I do not see real added value.
  • separate yaml file could be dedicated just to sheet name definition with nested prefixes for task notes, like this
   #sheet and task definitions, used for command line tab completion
   #on base level are sheet names, nested texts are predefined task notes (prefixes)
   #note: tab completion will not prevent you from using any other sheet/task names.
    gtd:
       - e-mail processing
       - daily review
       - weekly review
    rd:
       - code academy - JavaScript -
       - code academy - CSS -
       - code academy - Python -
    clientAlfons:
       - project management - telco -
       - nagios - react to alert - 
       - service configuration -
       - monthly SLA report
       - develop utility - 
    clientBerta:
       - project management - telco -
       - lessons - 
       - consulting -
       - wiki maintainance -

Then with daily/weekly review I would at the end simply look into this file and cleaned it a bit according to what I am expecting to be busy with, namely purging and adding the projects and activities, I am expecting to work on.

This is not supposed to be planning tool.

Tab completion of sheet names (and later? also task notes) should never block me from entering any sheet/task name I like, it shall just helping me with those, I have planned before.

If for any reason tab completion would require entering initial quote, I have no problem with that.

There is some ruby - readline realted article I found promising: http://bogojoker.com/readline/

@samg
Copy link
Owner

samg commented Nov 16, 2012

I like this idea a lot. It's hard to imagine using git without the autocomplete script. I'll try and take a crack at a basic version in the next couple weeks.

@categulario
Copy link
Collaborator

already implemented as per the readme https://github.com/samg/timetrap/#autocomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants