From f8218dc843bae8cb2fe96354ebe508b7dca0c09a Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Tue, 14 Sep 2021 21:49:51 +0700 Subject: [PATCH] mom look, I made a degit clone using julia! --- bin/degit | 30 ++++++++++++++++++++++++++++++ micro/colorschemes/night-owl.micro | 2 +- micro/settings.json | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 bin/degit diff --git a/bin/degit b/bin/degit new file mode 100755 index 0000000..51ede23 --- /dev/null +++ b/bin/degit @@ -0,0 +1,30 @@ +#!/usr/bin/env julia + +repo = "" +directory = "" + +if length(ARGS) >= 1 && ARGS[1] != "" + if startswith(ARGS[1], "https://") || startswith(ARGS[1], "git@") + repo = ARGS[1] + elseif startswith(ARGS[1], "github:") + repo = "git@github.com:" * chop(ARGS[1], head = 7, tail = 0) + elseif startswith(ARGS[1], "gitlab:") + repo = "git@gitlab.com:" * chop(ARGS[1], head = 7, tail = 0) + elseif startswith(ARGS[1], "bitbucket:") + repo = "git@bitbucket.org:" * chop(ARGS[1], head = 10, tail = 0) + else + repo = "git@github.com:" * ARGS[1] + end +else + println("Repository can't be empty!!!") + exit(1) +end + +if length(ARGS) > 1 && ARGS[2] != "" + directory = ARGS[2] +else + directory = split(repo, "/")[2] +end + +run(`git clone --depth=1 $repo $directory`) +run(`rm -rf $directory/.git`) \ No newline at end of file diff --git a/micro/colorschemes/night-owl.micro b/micro/colorschemes/night-owl.micro index 83cce4e..dcc60d9 100644 --- a/micro/colorschemes/night-owl.micro +++ b/micro/colorschemes/night-owl.micro @@ -21,7 +21,7 @@ color-link identifier.macro "" color-link identifier.class "#c792ea" # ok color-link identifier.var "#c5e478" # ok color-link indent-char "#515151" -color-link current-line-number "#4b6479,#000000" # ok +color-link current-line-number "#4b6479,#1d3b53" # ok color-link line-number "#868686,#1B1B1B" color-link preproc "#E0C589" color-link preproc.shebang "#ef1f23" # ok diff --git a/micro/settings.json b/micro/settings.json index e99c7f3..ccc748c 100644 --- a/micro/settings.json +++ b/micro/settings.json @@ -2,6 +2,8 @@ "*.go": { "tabstospaces": false }, + "autosave": 60, + "clipboard": "terminal", "colorscheme": "night-owl", "tabsize": 2, "tabtospaces": true