+48
Planned
command line integration
I can't live without terminal integration of some sort. What about a way to invoke Textastic from the command line?
Duplicates
1
Customer support service by UserEcho
I'll have a look at how this can be done for a sandboxed Mac App Store app.
Which command would you prefer? "textastic" or something else? (TextMate uses "mate" for example)
Not picky, really. David's suggestion prompted me to try
alias tt='open -a Textastic "$@"'
Which works, although I'm not married to that name :)
Here are quick fixes. Fix one is very simple and I use it for Mou. This works if you substitute Textastic for Mou.
and more complex that looks at options and where app is installed. This is 'mvim' for macvim. Also looks at name so other names can be symlinked to this shell script, like 'vimdiff'.You can avoid the sandboxing requirements by bundling the CLI script as a .pkg installation package; the preferable location to install the script (or binary if you go that route) would be /usr/local/bin. The user wishing to have such a script would select an application menu item to launch the installer.
My own workaround has been to simply associate the relevant code files with the app, and run open filename
Hmm, are you sure this would work and is allowed by Apple? If the installer is launched from within Textastic, wouldn't it inherit its sandbox and thus prevent Authorization Services from working? From the docs: "Important: The authorization services API is not supported within an app sandbox because it allows privilege escalation." See https://developer.apple.com/library/mac/documentation/Security/Reference/authorization_ref/Reference/reference.html
Do you know a sandboxed app on the Mac App Store that includes an installation package?
You would URL open the .pkg contained within your app bundle, this should hand off the file to the system-wide Installer.app which would perform the privilege escalation necessary for installation itself. I haven't tested this within a sandboxed app myself.
The only issue with this solution is that Textastic does not actually close when the tab is closed, only when the entire app is quit. This makes that particular workflow unsuitable for git commit messages or similar.
Actually, I guess since an entire new app instance is launched instead of opening in the same instance, we can just quit that instance with Cmd+Q instead of Cmd+W, and achieve the desired results., and not affect any other open documents.
Would be great if file type and indentation settings could be passed as command line parameters as well.