hx-zellij

This commit is contained in:
elwrcl committed 2026-08-19 13:21:21 +03:00
1 parent 184e3e97a4
commit a430d19d44
14 files changed
+1139 -3

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
{ ... }:
{
flake.homeModules.home-nushell-editor =
{ ... }:
{
programs.nushell = {
environmentVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
shellAliases = {
e = "hx";
cop = "ide ~/copland";
};
#/nu/#
extraConfig = ''
def hxf [] {
let picked = (
do {
fd --type f --hidden --exclude .git
| fzf --preview 'bat --color=always --style=numbers {}'
} | complete
)
if $picked.exit_code != 0 { return }
let file = ($picked.stdout | str trim)
if ($file | is-not-empty) { hx $file }
}
def hxd [rev: string = "@"] {
let files = (
jj diff --revision $rev --name-only
| lines
| where { |line| ($line | str trim) != "" }
)
if ($files | is-empty) {
print $"(ansi yellow)($rev) no changes (ansi reset)"
return
}
hx ...$files
}
'';
};
};
}