Read the non-trivial fish 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:
8
modules/fish/copy.fish
Normal file
8
modules/fish/copy.fish
Normal 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
|
||||
Reference in New Issue
Block a user