diff --git a/lib/sshyp.py b/lib/sshyp.py index 0d30229..c62c247 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -740,7 +740,7 @@ def copy_data(): # WSL clipboard detection if 'WSL_DISTRO_NAME' in environ: run(['powershell.exe', '-c', "Set-Clipboard '" + _copy_line[_index].rstrip().replace("'", "''") + "'"]) - Popen("sleep 30; pwsh.exe -c 'echo \"\" | Set-Clipboard'", shell=True) + Popen("sleep 30; powershell.exe -c Set-Clipboard ''", shell=True, stdout=DEVNULL, stderr=DEVNULL)) # Wayland clipboard detection elif 'WAYLAND_DISPLAY' in environ: run(['wl-copy', _copy_line[_index].rstrip()]) diff --git a/port-jobs/CLIPBOARD.py b/port-jobs/CLIPBOARD.py index f62be0a..5ff1489 100755 --- a/port-jobs/CLIPBOARD.py +++ b/port-jobs/CLIPBOARD.py @@ -9,7 +9,7 @@ arguments = argv[1:] if len(arguments) > 0: if arguments[0] == 'WSL': replacement = """run(['powershell.exe', '-c', "Set-Clipboard '" + _copy_line[_index].rstrip().replace("'", "''") + "'"]) - Popen("sleep 30; pwsh.exe -c 'echo \\"\\" | Set-Clipboard'", shell=True)""" + Popen("sleep 30; powershell.exe -c Set-Clipboard ''", shell=True, stdout=DEVNULL, stderr=DENVULL)""" elif arguments[0] == 'MAC': replacement = """run(['pbcopy'], stdin=Popen(['printf', _copy_line[_index].rstrip().replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')], stdout=PIPE).stdout)