This commit is contained in:
elwrcl committed 2026-08-02 04:07:25 +03:00
1 parent 6960ec0663
commit 20ecde0e15
17 files changed
+556 -1

No files matched your search

@@ -0,0 +1,37 @@
{ ... }:
{
flake.homeModules.home-nushell-commandline-copy =
{ ... }:
{
programs.nushell.extraConfig = ''
use std/clip
def nu-highlight-default [] {
let input = $in
$env.config.color_config = {}
$input | nu-highlight
}
def "nu-keybind commandline-copy" []: nothing -> nothing {
commandline
| nu-highlight-default
| [ "```ansi" $in "```" ]
| str join (char nl)
| clip copy --ansi
}
$env.config.keybindings ++= [
{
name: copy_color_commandline
modifier: control_alt
keycode: char_c
mode: [ emacs vi_insert vi_normal ]
event: {
send: executehostcommand
cmd: 'nu-keybind commandline-copy'
}
}
]
'';
};
}