rio icon indicating copy to clipboard operation
rio copied to clipboard

macOS: Launch in specified directory

Open dpassen opened this issue 6 months ago • 4 comments

I frequently launch my terminal from within emacs via a package called terminal-here. Long story short, it does the equivalent of:

open -a rio path/to/directory

With a number of terminal emulators, this will launch in the declared directory, but in rio, this will only work if rio is already open. Then, in my case, a new tab will open in the right directory. However, launching from a quit state does not.

$ rio --version
rioterm 0.2.18

$ cat ~/.config/rio/config.toml 
confirm-before-quit = false
option-as-alt = 'left'
padding-x = 10
padding-y = [10, 10]

[adaptive-theme]
dark = 'Ef-Dark'
light = 'Ef-Light'

[editor]
program = '/opt/homebrew/bin/hx'

[fonts]
family = 'MonoLisa Variable'
hinting = false
size = 12

[navigation]
mode = 'NativeTab'
use-current-path = true
use-split = false

dpassen avatar Jun 13 '25 19:06 dpassen

You can launch in a specified directory using:

rio --working-dir <some path>

Is there any way you can configure terminal-here to invoke this instead of open -a ?

EDIT: there shouldnt be an equal to sign in the command

ajinkya-k avatar Aug 08 '25 02:08 ajinkya-k

It was supposed to be working already https://github.com/davidshepherd7/terminal-here/blob/master/terminal-here.el#L282 considering it runs a -e with open current directory on a cd 🤔

raphamorim avatar Aug 08 '25 10:08 raphamorim

@dpassen could you check if is reproducible in the latest?

raphamorim avatar Aug 08 '25 10:08 raphamorim

Sorry for the late reply. It doesn't work, at least not on macOS. On macOS, it uses the command I mentioned initially: open -a rio path/to/directory https://github.com/davidshepherd7/terminal-here/blob/7caa4d5a90d442b15fccdeff80d51f8837fe74ed/terminal-here.el#L338

dpassen avatar Oct 13 '25 21:10 dpassen