Stunkymonkey / nautilus-open-any-terminal

GNU General Public License v3.0
536 stars 54 forks source link

"Open (terminal) here" does not open local terminal on sftp mounts #79

Closed IvoryJam closed 8 months ago

IvoryJam commented 1 year ago

When selecting the "Open (terminal) here" on sftp mounts, it still SSH's into the host and cd's into the directory

And when it does cd into the directory it breaks if there's a space in the folder's name because of url encoding

bash: line 1: cd: /home/IvoryJam/New%20Folder: No such file or directory
Stunkymonkey commented 1 year ago

are you using the latest version?

I guess the issue is somewhere here: https://github.com/Stunkymonkey/nautilus-open-any-terminal/blob/master/nautilus_open_any_terminal/open_any_terminal_extension.py#L288

IvoryJam commented 1 year ago

Yes, 0.4.0 from pypi

pip install --user nautilus-open-any-terminal --upgrade
Requirement already satisfied: nautilus-open-any-terminal in ./.local/lib/python3.11/site-packages (0.4.0)

what about it ssh-ing when trying to open a local terminal instead of ssh-ing though? I know Python so I can help somewhat but I don't know Nautilus's plugin

IvoryJam commented 1 year ago

Played around with the code for a bit, got spaces working and figured I'd get single quotes ' and double quotes " working too. ' was easy, " is harder. It looks awful but works, I'm seeing what I can do to avoid having 7 backslashes in the command for a single ". I can submit a PR once I either clean up the code or give up and let you decide

As for the Remote terminal when not selecting remote, I haven't looked into that one yet.