non important commit
This commit is contained in:
parent
3aca6ec61a
commit
ce704e9e6f
2 changed files with 11 additions and 23 deletions
|
|
@ -47,18 +47,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if $local {
|
if $local {
|
||||||
|
print "You are all done"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh "admin@silvers.fun" $"sudo -S -u git git init --bare /var/lib/git-server/($name).git"
|
|
||||||
print $"Repository ($name) created successfully!"
|
|
||||||
|
|
||||||
git init
|
|
||||||
git add .
|
|
||||||
git commit -m "Project setup"
|
|
||||||
git remote add origin $"git@silvers.fun:($name).git"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
print "You are all done"
|
print "You are all done"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -57,20 +57,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
def edit [file: path] {
|
def edit [file: path] {
|
||||||
match ($file | path parse | get extension) {
|
let result = do {
|
||||||
"rs" => {
|
git rev-parse --show-toplevel
|
||||||
flake rust -c $"nvim ($file)"
|
} | complete
|
||||||
}
|
|
||||||
"zig" => {
|
if $result.exit_code == 0 {
|
||||||
flake zig -c $"nvim ($file)"
|
let root = $result.stdout | str trim
|
||||||
}
|
cd root
|
||||||
"c" | "cpp" => {
|
nix develop . --command bash -c $"nvim ($file)"
|
||||||
flake c -c $"nvim ($file)"
|
} else {
|
||||||
}
|
nvim file
|
||||||
"cs" => {
|
|
||||||
flake c-sharp -c $"nvim ($file)"
|
|
||||||
}
|
|
||||||
_ => {nvim $file}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue