Compare commits
2
Commits
65ab18e077
...
38fcc71ca3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38fcc71ca3
|
||
|
|
da0e57ae22
|
@@ -0,0 +1,6 @@
|
||||
# Resolve path to the cargo target dir, including an optional subpath
|
||||
def ctd [
|
||||
path?: string
|
||||
] {
|
||||
$"($env.CARGO_TARGET_DIR)/($path)"
|
||||
}
|
||||
@@ -2,7 +2,8 @@ def gitfixremote [
|
||||
--name: string = "origin",
|
||||
] {
|
||||
let url = (git remote get-url $name)
|
||||
let parsed = ($url | parse --regex '(https://)?(?P<host>[^/]+)(/|:)(?P<owner>[^/]+)/(?P<repo>[^/\.]+)')
|
||||
let parsed = ($url | parse --regex '(https://)?(\w*@)?(?P<host>[^/]+)(/|:)(?P<owner>[^/]+)/(?P<repo>[^/\.]+)')
|
||||
|
||||
if ($parsed | is-empty) {
|
||||
print "Unparseable remote"
|
||||
return
|
||||
|
||||
Executable → Regular
Reference in New Issue
Block a user