Merge branch 'shlex'

Hopefully fixed the issues with exporting lines containing lots of quotes and symbols to X.
This commit is contained in:
Storm Dragon 2019-04-30 09:30:22 -04:00
commit 8394ad551e

View File

@ -28,7 +28,7 @@ class command():
return return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory') clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
for display in range(10): for display in range(10):
p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + clipboard.replace('"','\\\\\\"') +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True) p = Popen('su ' + self.env['general']['currUser'] + ' -c "cat << \\\"EOF\\\" | xclip -d :' + str(display) + ' -selection clipboard\n' + clipboard + '\nEOF\n"', stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
self.env['runtime']['outputManager'].interruptOutput() self.env['runtime']['outputManager'].interruptOutput()
#screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding') #screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding')