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

Configuration .zsrhc for use with peco keybindings #22

Closed
matthiasfromm opened this issue Nov 2, 2017 · 6 comments
Closed

Configuration .zsrhc for use with peco keybindings #22

matthiasfromm opened this issue Nov 2, 2017 · 6 comments

Comments

@matthiasfromm
Copy link

I have trouble to properly setup peco and the keybindings. I don't really have much experience with command line tools, so I'm not sure what to put inside the .zshrc file.

I assume I have to put

$ source "$GOPATH/src/github.com/sachaos/todoist/todoist_functions.sh" ?

Would be happy to get some support here.

Thanks in advance!

@sachaos
Copy link
Owner

sachaos commented Nov 3, 2017

@matthiasfromm Yes. You should load todoist_function.sh script by source on .zshrc .

@matthiasfromm
Copy link
Author

Hi @sachaos !

Thanks for your reply. Any configuration of my .zshrcfile does not work to finally use peco with todoist (yes, I did switch from bash to zsh first).

Could you post an example of how the .zshrc should look to load the script? Thanks!

@sachaos
Copy link
Owner

sachaos commented Nov 6, 2017

@matthiasfromm
How did you install todoist command?
If you installed by homebrew, todoist_function.sh might not exist under $GOPATH.
In this case, the most simple solution is to write https://github.com/sachaos/todoist/blob/master/todoist_functions.sh content in .zshrc.
I don't know how to detect file path which downloaded by homebrew, but you can load from that file too.

@matthiasfromm
Copy link
Author

Thanks again @sachaos!

Yes, I did install using homebrew. Maybe that's a helpful note to add to https://github.com/sachaos/todoist#use-with-peco ?

I've put the content of todoist_function.sh in the .zshrc file, but I still can't get the peco keybinding to work. Stupid question - how do I trigger the keybindings to go into "query mode"? The tab key doesn't seem to do the trick, the enter key only enters the command an results in Incorrect Usage: invalid value "taskexample" for flag -P: strconv.ParseInt: parsing "taskexample": invalid syntax.

@sachaos
Copy link
Owner

sachaos commented Nov 9, 2017

@matthiasfromm
May be, the problem is that you are using wrong keybindings.
Please operate as follows.

1. Set task name.

On the terminal, input like below.

todoist add "test task"

2. Enter Project select screen, and select project.

After entering the command above, enter the project selection screen (Query mode) by the following key binding with the cursor on the right side (without pressing the enter key).

Push Ctrl + x, push t, push p.

On the query mode, you should read https://github.com/peco/peco manual.
Other keybindings are here. https://github.com/sachaos/todoist#keybind

3. Back to prompt, and register task.

When back to the prompt, you can see setted selected project id like below.

todoist add "test task" -P {ProjectID}

Exexute that command by enter, and register task to Todoist.

@matthiasfromm
Copy link
Author

@sachaos That did the trick! Seems like my problem in the end was that I wasn't aware of how to enter the project select screen, even though you did provide the keybindings. But the more elaborate instructions above did help!

Thanks for your support!

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

2 participants