From 020d00dbe7110054e8b9015ef8f190bb7978c7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 11 Nov 2021 11:09:23 +0100 Subject: [PATCH] Add command for yanking gh clone command --- symlinks/config/tridactyl/tridactylrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/symlinks/config/tridactyl/tridactylrc b/symlinks/config/tridactyl/tridactylrc index 47557f8..c53271c 100644 --- a/symlinks/config/tridactyl/tridactylrc +++ b/symlinks/config/tridactyl/tridactylrc @@ -5,6 +5,8 @@ set theme dark " Taken from https://github.com/tridactyl/tridactyl/blob/230600ff950e6948225ec03f9b6858e965e37d22/.tridactylrc#L47 command githubpryank composite js document.getElementById("clone-help-step-1").textContent.replace("git checkout -b", "git checkout -B").replace("git pull ", "git fetch ") + "git reset --hard " + document.getElementById("clone-help-step-1").textContent.split(" ")[3].replace("-","/") | yank +command githubcloneyank composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | yank + command githubprexplore js let url = document.getElementById("clone-help-git-url").value; let branch = document.getElementById("clone-help-step-1").children[1].textContent.replace("git checkout -b ", "").split(" ")[0]; tri.native.run("alacritty --command fish -c 'git-explore-local " + url + " " + branch + "'") command githubexplorelocal js let url = document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git"); tri.native.run("alacritty --command fish -c 'git-explore-local " + url + "'")