adjust homesick open output to what really happens
rweng opened this issue · 3 comments
rweng commented
So homesick open bash-it
did not open the directory for me. However, it says
brackets /Users/rowe/.homesick/repos/bash-it Opening the root directory of castle 'bash-it' in editor 'brackets'.
and when I ran the same command manually, it worked. Turns out, what actually happens is
say_status "#{ENV['EDITOR']} #{castle_dir.realpath}",
"Opening the root directory of castle '#{castle}' in editor '#{ENV['EDITOR']}'.",
:green
inside castle_dir do
system(ENV['EDITOR'])
end
So it does not run $EDITOR with the path as argument, but inside the castle dir. I suggest changing the system call to
system("#{ENV['EDITOR']} #{castle_dir.realpath}")
# or, if you want to keep the inside castle_dir block:
system("#{ENV['EDITOR']} .")
As this might break installations I would understand if you just want to adjust the output, but I think say_status should be in sync with what is really executed.
JCook21 commented
Sounds like a good idea to me. Would you like to submit a PR? I think we can continue the conversation on this there.
rweng commented
works with the pull-request for me. Opens brackets
and outputs:
/Users/rowe/.homesick/repos/bash-it: brackets . Opening the root directory of castle 'bash-it' in editor 'brackets'.
JCook21 commented
Closing this issue as the associated PR has been merged.