1. Briefly
I don’t understand, how I can run Windows shell command into Sublime Text plugin.
2. Expected behavior
I open file → Ctrl+Shift+P → SimplyDelete
→ current file delete for me. I need to do this use del Windows command.
3. Did not help
My Default.sublime-commands
file:
[{
"caption": "SimplyDelete",
"command": "simply_delete"
}]
My simplydelete.py
file:
#!/usr/bin/env python
# coding: utf-8
import os
import sublime
import sublime_plugin
class SimplyDelete(sublime_plugin.ApplicationCommand):
def simply_delete_current_file(self):
command = "del /Q"
file_path = self.view.file_name()
os.system(command + file_path)
But it don’t work for me.
4. Do not offer
- Yes, I know about build systems, please, do not offer this.
- Yes, I know other methods to delete file. I want delete file exclusively use
.py
plugin and Windowsdel
command.
Thanks.