refactor(fish): read the non-trivial snippets from files

Move the interactiveShellInit block and the copy function body into
modules/fish/*.fish and pull them in with builtins.readFile, so the
non-trivial fish lives in real fish files (highlighting, fish_indent)
instead of inline Nix strings. The Auto-loader only collects .nix, so
the new .fish files are ignored by it. Rendered config is unchanged.
This commit is contained in:
2026-07-18 18:34:42 -04:00
parent 9eb0fe797a
commit 16f29bd64a
3 changed files with 33 additions and 35 deletions

8
modules/fish/copy.fish Normal file
View File

@@ -0,0 +1,8 @@
set count (count $argv | tr -d \n)
if test "$count" = 2; and test -d "$argv[1]"
set from (echo $argv[1] | trim-right /)
set to (echo $argv[2])
command cp -r $from $to
else
command cp $argv
end