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

run_after doesn*t work #123

Closed
can-I-do opened this issue Oct 29, 2021 · 15 comments
Closed

run_after doesn*t work #123

can-I-do opened this issue Oct 29, 2021 · 15 comments
Labels

Comments

@can-I-do
Copy link

hey,

first thx for the tool and the nice guide putting it into the status bar from iterm!
I just followed the guide and the "run_after" command doesnt seem to do anything for me :(

i just added a new line at the bottom:
run_after: /path/smth.sh
also tried
run_after: "/path/smth.sh"

any advice here?

@ttscoff
Copy link
Owner

ttscoff commented Oct 29, 2021 via email

@can-I-do
Copy link
Author

can-I-do commented Oct 29, 2021

https://brettterpstra.com/2021/10/15/see-what-youre-doing-in-the-iterm-status-bar/
that is the guide, and wanted to start the small script provided there, but it is not starting anything, also no other scripts :)
I am on a Mac, BigSur, no M1
I know that it isnt running because the variable and therefor the status bar doenst change. When I just run in manually the status bar changes

@ttscoff
Copy link
Owner

ttscoff commented Oct 29, 2021 via email

@can-I-do
Copy link
Author

can-I-do commented Nov 2, 2021

doing -v
doing version 1.0.93

@can-I-do
Copy link
Author

can-I-do commented Nov 3, 2021

I also tried it with hooks, as I found it in the docs ;) but still doesn't seem to work. Maybe smth is wrong with my system...

@ttscoff
Copy link
Owner

ttscoff commented Nov 3, 2021 via email

@ttscoff ttscoff added the bug label Nov 21, 2021
@can-I-do
Copy link
Author

can-I-do commented Nov 22, 2021

so, I installed 2.0, first of all thx for the update!
It still is not working...
plugins: plugin_path: "/Users/can-I-do/.config/doing/plugins"

cat /Users/can-I-do/.config/doing/plugins/post_write.rb
Doing::Hooks.register :post_write do |filename| res = /bin/bash ~/after_doing.sh.strip Doing.logger.debug('Hooks:', res) end

if I manually run /bin/bash ~/after_doing.sh it is working, but from doing now or finish it is not

@ttscoff
Copy link
Owner

ttscoff commented Nov 22, 2021

Does the debug log show up when you run a command? (be sure to run with doing --debug, or change it to Doing.logger.warn for testing purposes)

@ttscoff
Copy link
Owner

ttscoff commented Nov 22, 2021

Also try running DOING_PLUGIN_DEBUG=true doing to see if the hook is registering correctly. You should see:

>  Hook Manager: Registered post_write hook

@can-I-do
Copy link
Author

can-I-do commented Nov 23, 2021

❯ doing now test hook
    New entry: added "Test hook" to Currently
❯ DOING_PLUGIN_DEBUG=true doing
>  Logging at level: debug
       8:47am: Test hook (Currently)
>  Plugin Manager: Registered export plugin "csv"
>  Plugin Manager: Registered export plugin "html"
>  Plugin Manager: Registered export plugin "timeline"
>  Plugin Manager: Registered export plugin "markdown"
>  Plugin Manager: Registered export plugin "taskpaper"
>  Plugin Manager: Registered export plugin "template"
>  Plugin Manager: Registered export plugin "doing"
>  Plugin Manager: Registered import plugin "calendar"
>  Plugin Manager: Registered import plugin "doing"
>  Plugin Manager: Registered import plugin "timing"
>  Hook Manager: Registered post_write hook
>      Config: Local config files found:
>         ENV: No EDITOR environment variable, testing available editors

This seems to work. Same with Doing.logger.warn

❯ doing now test hook
    New entry: added "Test hook" to Currently
>       Hooks: /bin/bash ~/after_doing.sh

but still it is not doing smth :/ I am really not sure why ... probably some really silly mistake on my side than.

@can-I-do
Copy link
Author

CleanShot 2021-11-23 at 09 02 54

@ttscoff
Copy link
Owner

ttscoff commented Nov 23, 2021 via email

@can-I-do
Copy link
Author

  • no doesn't work

  • tried it with an echo "test" script -> didn't work

  • yes after and test.sh are executable

really strange :/ and sad, but I guess it is something on my side if it works for others. dont want to bother you further with my problems :D

@ttscoff
Copy link
Owner

ttscoff commented Nov 23, 2021 via email

@can-I-do
Copy link
Author

thanks for your help! I will try my best to figure it out

soto97 added a commit to soto97/dotfiles that referenced this issue Dec 7, 2021
I followed these instructions:
https://brettterpstra.com/2021/10/15/see-what-youre-doing-in-the-iterm-status-bar/

With the hooks mod from here:
ttscoff/doing#123
https://github.com/ttscoff/doing/wiki/Hooks

And my fix from here:
ttscoff/doing#130

 On branch main
 Your branch is ahead of 'origin/main' by 3 commits.
   (use "git push" to publish your local commits)

 Changes to be committed:
	modified:   bash_prompt
@ttscoff ttscoff closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants