Ji4n1ng / OpenInTerminal

✨ Finder Toolbar app for macOS to open the current directory in Terminal, iTerm, Hyper or Alacritty.
MIT License
5.88k stars 235 forks source link

Copy Path with the option of POSIX formatting to escape space characters #215

Open briantully opened 5 months ago

briantully commented 5 months ago

Summarize this feature

Unlike Linux, most Mac users (and macOS itself) create folders/directories that contain spaces between words, e.g., "/path/My Folder/My Subfolder", "/Library/Application Support/Apple", etc.

However when the "Copy Path" feature is selected from the contextual menu for any of these paths, it copies the path that is not usable in the Terminal due to the space characters not being escaped. For example if I wanted to copy the path and act on it in the Terminal, it would show an error:

cd /Library/Application Support/Apple
cd:cd:8: no such file or directory: /Library/Application

Why should this feature be included?

Ideally "Copy Path" would provide an option to copy the path in POSIX format, which would escape the space (and other illegal) characters, so that it copies the above path as /Library/Application\ Support/Apple