Skip to content

Instantly share code, notes, and snippets.

@DanielSundberg
Last active October 1, 2018 17:37
Show Gist options
  • Save DanielSundberg/a1f0895396ebd36bc497 to your computer and use it in GitHub Desktop.
Save DanielSundberg/a1f0895396ebd36bc497 to your computer and use it in GitHub Desktop.
AutoHotkey script to fix gerrit download url:s for Powershell
; This script will take the url you get from
; the Gerrit download button and replace
; the unix command/line separator ('&&') with
; a ';' which is accepted as line break in
; PowerShell
;
; This works with Gerrit 2.9 on Windows/Firefox
; with Flash enabled
;
#Persistent
return
OnClipboardChange:
if SubStr(clipboard, 1, 9) = "git fetch"
{
if InStr(clipboard, "some_other_url_element") > 0
{
FixString = %clipboard%
StringReplace, FixString, FixString,&&,;, All
clipboard:=FixString
ToolTip "Clipboard: " %FixString%
Sleep 1500
ToolTip ; Turn off the tip.
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment