Replies: 3 comments 1 reply
-
Hi, what error do you get in Obsidian? And what is the script you tried first before the |
Beta Was this translation helpful? Give feedback.
0 replies
-
No error, nothing happens at all. The script I tried is one that is
installed with the editor. This script is for launching the Cot editor from
the command line and it works great.
To run it from the terminal I can just type cot. Optionally you can
provide a file name, line number and col number and it will launch the
editor with that file and the cursor placed at the provided line and col.
If you have a Mac, you can install CotEditor (it is free). Then in the pets
you can optionally install the command line script that I refer to above.
Thanks!
-G
On Thu, Apr 6, 2023 at 11:01 PM Jarkko Linnanvirta ***@***.***> wrote:
Hi, what error do you get in Obsidian? And what is the script you tried
first before the open command? When you use the script from terminal,
what command do you use to launch the script?
—
Reply to this email directly, view it on GitHub
<#342 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARE7E7GFI4SE7UNQTPWYTW76GQBANCNFSM6AAAAAAWV6GGKM>
.
You are receiving this because you authored the thread.Message ID:
<Taitava/obsidian-shellcommands/repo-discussions/342/comments/5549894@
github.com>
--
—
Gary
|
Beta Was this translation helpful? Give feedback.
1 reply
-
No change.
—
Gary *. *
…On Mon, Apr 10, 2023 at 2:28 AM Jarkko Linnanvirta ***@***.***> wrote:
Hi, too bad, I don't have a Mac.
Maybe you need to add the CotEditor's directory to the PATH environment
variable:
https://publish.obsidian.md/shellcommands/Environments/Additions+to+the+PATH+environment+variable
Does this help? 🙂
------------------------------
No error, nothing happens at all.
I think you saw some error with the other command:
open -a CotEditor {{file_path:relative}} --args -l {{caret_position:line}}
It opens the editor, and the file but it does not move the caret. *I also
get an error in Obsidian.*
—
Reply to this email directly, view it on GitHub
<#342 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARE7BF34P2JPWDDF3KEW3XAOY7JANCNFSM6AAAAAAWV6GGKM>
.
You are receiving this because you authored the thread.Message ID:
<Taitava/obsidian-shellcommands/repo-discussions/342/comments/5568488@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get Cot Edtior on macos to open a file to a line and column. As part of Cot Edtior they provide a shell script which you can install to /usr/local/bin (or preference) which will launch the editor. This works great from the terminal.
However, if I use this script from shell commands, nothing happens. I have tried all kinds of permutations and nothing so far has worked. I then tried using
open -a CotEditor {{file_path:relative}}
this opens the editor and the file, which gets me part way there. But I want to open to the line and row that caret is at in the document, so I tried
open -a CotEditor {{file_path:relative}} --args -l {{caret_position:line}}
It opens the editor, and the file but it does not move the caret. I also get an error in Obsidian.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions