fix custom commands and add ed command

This commit is contained in:
Schrottkatze 2024-02-16 08:21:20 +01:00
parent dc52ae747d
commit f33c9ae161
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc

View file

@ -782,9 +782,9 @@ def start_zellij [] {
start_zellij start_zellij
def nsp [ def nsp [
program: string ...programs: string
] { ] {
nix shell $"nixpkgs#$program" nix shell ...($programs | each {|it| $"nixpkgs#($it)" })
} }
def lcr [ def lcr [
@ -806,6 +806,17 @@ def glog [
| split column "»¦«" commit subject name email date | split column "»¦«" commit subject name email date
} }
def ed [
file: path
...cmdargs: string
] {
let ext = $file | path parse | get extension;
match $ext {
"typ" => {|| zellij run --direction down -- typst watch $file --open ($cmdargs | str join ' ') }
};
hx $file
}
alias gnix = cd ~/nix-configs; alias gnix = cd ~/nix-configs;
alias grepo = cd ~/Documents/repos; alias grepo = cd ~/Documents/repos;
alias wh = wormhole-rs; alias wh = wormhole-rs;