CLI flag for working directory #347

Closed
opened 9 months ago by rumpelsepp · 5 comments

I wanted to configure thunar's "Open in Terminal" menu in order to use foot. A --working-directory or similar flag would be helpful.

I wanted to configure `thunar`'s "Open in Terminal" menu in order to use foot. A `--working-directory` or similar flag would be helpful.
Collaborator

See #139. This can be done by setting the command to:

sh -c "(cd '%f'; exec foot)"
See #139. This can be done by setting the command to: ```sh sh -c "(cd '%f'; exec foot)" ```
Poster

Yeah sure, but it's IMO overkill for such an obvious setting.

Yeah sure, but it's IMO overkill for such an obvious setting.
Owner

@craigbarnes unless you're strongly against it, I'm considering adding support for this.

This is, what, the third time someone asks for it? The implementation is not much more than a chdir(). While it is possible to work around it, as you've shown, isn't it more efficient to handle this in foot?

@craigbarnes unless you're strongly against it, I'm considering adding support for this. This is, what, the third time someone asks for it? The implementation is not much more than a `chdir()`. While it _is_ possible to work around it, as you've shown, isn't it more efficient to handle this in foot?
Collaborator

@dnkl Yeah I was going to suggest just adding it too. The last 2 times it was brought up, there was no actual use case mentioned in the issue, but this one makes sense. I think it's worth adding just for the fact that it's easier to document than the other method.

@dnkl Yeah I was going to suggest just adding it too. The last 2 times it was brought up, there was no actual use case mentioned in the issue, but this one makes sense. I think it's worth adding just for the fact that it's easier to document than the other method.
sv commented 9 months ago

FWIW, I had exactly the same problem in the past as I wanted to call foot in the current directory of vifm.
Ended up doing this:

nnoremap <f9> :!foot bash -c "cd %d; exec bash" %i &<cr>

It works.

FWIW, I had exactly the same problem in the past as I wanted to call `foot` in the current directory of `vifm`. Ended up doing this: ```vim nnoremap <f9> :!foot bash -c "cd %d; exec bash" %i &<cr> ``` It works.
dnkl added the
enhancement
easy
labels 9 months ago
dnkl closed this issue 8 months ago
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.