Ok, I tried adding those options… not sure if I did it right,
import sublime, sublime_plugin, os
class P4EditCommand(sublime_plugin.TextCommand):
def run(self, edit):
if self.view.file_name():
folder_name, file_name = os.path.split(self.view.file_name())
self.view.window().run_command('exec', {'cmd': 'p4', 'edit', file_name], 'working_dir':folder_name, 'shell':True} )
All it outputs now is:
Perforce -- the Fast Software Configuration Management System.
p4 is Perforce's client tool for the command line. Try:
p4 help simple list most common commands
p4 help commands list all commands
p4 help command help on a specific command
p4 help charset help on character set translation
p4 help configurables list server configuration variables
p4 help environment list environment and registry variables
p4 help filetypes list supported file types
p4 help jobview help on jobview syntax
p4 help revisions help on specifying file revisions
p4 help usage generic command line arguments
p4 help views help on view syntax
The full user manual is available at http://www.perforce.com/manual.
Server 2010.2/322263.
[Finished]
I’ve checked the values of the variables and this seems to work from the command line just fine. BTW, is there an easy way to print debug text to the python console from inside sublime? I’m sure this is a simple syntax thing, but I’m having trouble finding examples of anything similar.