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.
9 lines
209 B
Fish
9 lines
209 B
Fish
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
|