How can I change the way in which filenames are escaped (formatted) when dragged from applications and dropped into Terminal?

For example, paths may be escaped with \, just spaces (), or other options. Path Finder, for example, has the following options under Copy Path:

  • UNIX
  • HFS
  • Windows
  • Terminal
  • URL
  • Name

Specifically, I'm looking for the setting(s) that can be applied via the shell, such as:

defaults write tld.domain.appOrLib SomeSettingScope -string "SettingDetails"
  • XtraFinder has the same options as you listed, and it's free and will integrate directly with Finder. – At0mic Dec 5 '15 at 17:25
  • I'm looking for the general functionality that will work across all apps so that, for example, I can drag a document from TextMate's titlebar and have the escaping a certain way upon drop into Terminal. – ylluminate Dec 5 '15 at 18:15
  • @ylluminate I don't really understand this question - but i'd like to try to. You need a Terminal/bash setting/switch which either formats a dragged path_to_file UNIX like (/path/to/file), Windows-like (\path\to\file) or HFS like (path:to:file) etc.? – klanomath Dec 5 '15 at 19:12
  • So @klanomath, you understand that when you drag something from Finder or a titlebar, into terminal then the file and its accompanying path are escaped traditionally with backslashes, right? This behavior can be changed to give no escaping or apparently other escape sequences as well. I would like to understand how these options are set in OS X, which I assume can be issued as a shell command as noted above. – ylluminate Dec 5 '15 at 19:24
  • @ylluminate I don't think so. I believe the Terminal app interprets the file path and escapes if if necessary. If you can provide a link to where it says the behavior can be changed, then I'd be happy to help you figure it out. – At0mic Dec 5 '15 at 19:42

You must log in to answer this question.

Browse other questions tagged .