Closed gour closed 7 years ago
@gour, I'm sorry for the inconvenience. This was actually an intentional change that resulted from the discussion in #96. Now, xdg-open
(or open
on OSX) is used for all files.
You can query the current default as follows:
xdg-mime query default text/plain
It will probably show something like gedit.desktop
in your case. Execute xdg-mime default vim.desktop text/plain
and try again.
Now, xdg-open (or open on OSX) is used for all files.
Hmm...does it mean that there is no way to force taskopen to honour $EDITOR any longer?
It will probably show something like gedit.desktop in your case.
That's true.
Execute xdg-mime default vim.desktop text/plain and try again.
Well, I'm happy to have gedit as default text viewer when e.g. using Nautilus file manager, but for cli app like taskwarrior running under tasksh I'd like to have ability to use my $EDITOR which is used e.g. for git/fossil commit messages and other cli-related stuff.
So, if the new(er) taskopen cannot use $EDITOR, then I'll stay with the old version...
@gour. That's a good point. I haven't anticipated this use case. Nevertheless, there is an easy way to solve this with a simple wrapper script for xdg-open. You can find an example on the devel branch: https://github.com/ValiValpas/taskopen/blob/devel/scripts/xdg-open-cli
Nevertheless, there is an easy way to solve this with a simple wrapper script for xdg-open.
From where should I call it?
Directly in taskopen with something like:
my $XDG = "xdg-open-cli";
You just need to modify the FILE_CMD in your ~/.taskopenrc, e.g.:
FILE_CMD='xdg-open-cli $FILE'
You just need to modify the FILE_CMD
Ahh, I missed that one...thank you, it works now. ;)
Let me know (ideally through email since I don't follow every issue on Github) if there's any changes that should be made because of my commits. I'm willing to spend time to fix any bugs or design flaws because of changes I was involved with.
Hello,
few days ago I pulled latest taskopen and noticed that it does not honour my old setup and when I e.g. issue:
taskopen launches gedit editor instead of vim.
Here is my taskopenrc file:
For now solution was to revert with:
Any hint?
Let me add that my (fish) shell also sets:
which is confirmed with: