nushell stuff

This commit is contained in:
Matt Nish-Lapidus 2025-06-30 10:50:46 -04:00
parent 396aee7db9
commit fbd6656d80
6 changed files with 36 additions and 85 deletions

View file

@ -1,32 +0,0 @@
{ config, lib, pkgs, ... }:
{
programs.fish = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
"gtr" = "gtrash -r";
"rmr" = "gtrash -r";
"rm" = "gtrash put";
"lg" = "lazygit";
};
# change fzf variable search to C-M-v
interactiveShellInit = ''
bind --erase \ct
fzf_configure_bindings --variables=\e\cv
'';
plugins = [
{
name = "upto";
src = pkgs.fetchFromGitHub {
owner = "Markcial";
repo = "upto";
rev = "2d1f35453fb55747d50da8c1cb1809840f99a646";
sha256 = "sha256-Lv2XtP2x9dkIkUUjMBWVpAs/l55Ztu7gIjKYH6ZzK4s=";
};
}
];
};
}

View file

@ -6,8 +6,10 @@
shellAliases = {
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
"gtr" = "gtrash -r";
"gtr" = "gtrash restore";
"rmr" = "gtrash restore";
"rm" = "gtrash put";
"lg" = "lazygit";
};
# change fzf variable search to C-M-v

View file

@ -1,29 +0,0 @@
{ config, lib, pkgs, ... }:
{
programs.nushell = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"gtr" = "gtrash -r";
"rm" = "gtrash put";
"rmr" = "gtrash -r";
"lg" = "lazygit";
};
loginFile.text = ''
${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname)
'';
environmentVariables = {
ENV_CONVERSIONS.PATH = {
from_string = lib.hm.nushell.mkNushellInline "{|s| $s | split row (char esep) }";
to_string = lib.hm.nushell.mkNushellInline "{|v| $v | str join (char esep) }";
};
};
settings = {
show_banner = false;
};
};
}

View file

@ -0,0 +1,8 @@
let fish_completer = {|spans|
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
| from tsv --flexible --noheaders --no-infer
| rename value description
| update value {
if ($in | path exists) {$'"($in | path expand --no-symlink | str replace --all "\"" "\\\"" )"'} else {$in}
}
}

View file

@ -5,10 +5,12 @@
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"gtr" = "gtrash -r";
"gtr" = "gtrash restore";
"rmr" = "gtrash restore";
"rm" = "gtrash put";
"lg" = "lazygit";
};
configFile.source = ./config.nu;
loginFile.text = ''
${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname)
'';