feat: 适配 git submodule 方式引用
This commit is contained in:
parent
a4663a3c2e
commit
aba12699a6
@ -1,22 +0,0 @@
|
||||
# active_config.nu -- 当前活动的 dotfiles 配置
|
||||
#
|
||||
# dotfiles 可用的配置为一个 Nushell 模块,通过文件夹形式组织:`<模块名>/mod.nu`。
|
||||
# 模块需要声明 `register` 函数以通过 dotfiles 模块进行当前模块的信息注册。如:
|
||||
#
|
||||
# > use ../knotfiles/dotfile *
|
||||
# >
|
||||
# > def-env register [] {
|
||||
# > declare "example" "example/example.yml" ".config/example.yml"
|
||||
# > }
|
||||
#
|
||||
# 若要启用一个配置,则需要在此文件中导入该模块,并在 `register` 函数中调用对应模块的
|
||||
# `register` 函数。
|
||||
#
|
||||
# Copyright (C) 2022-2023 KAAAsS
|
||||
|
||||
use example_module
|
||||
|
||||
# 注册全部模块
|
||||
export def-env register [] {
|
||||
example_module register
|
||||
}
|
1
active_config.nu
Symbolic link
1
active_config.nu
Symbolic link
@ -0,0 +1 @@
|
||||
../active_config.nu
|
22
active_config.nu.example
Normal file
22
active_config.nu.example
Normal file
@ -0,0 +1,22 @@
|
||||
# active_config.nu -- 当前活动的 dotfiles 配置
|
||||
#
|
||||
# dotfiles 可用的配置为一个 Nushell 模块,通过文件夹形式组织:`<模块名>/mod.nu`。
|
||||
# 模块需要声明 `register` 函数以通过 dotfiles 模块进行当前模块的信息注册。如:
|
||||
#
|
||||
# > use ../knotfiles/dotfile *
|
||||
# >
|
||||
# > def-env register [] {
|
||||
# > declare "example" "example/example.yml" ".config/example.yml"
|
||||
# > }
|
||||
#
|
||||
# 若要启用一个配置,则需要在此文件中导入该模块,并在 `register` 函数中调用对应模块的
|
||||
# `register` 函数。
|
||||
#
|
||||
# Copyright (C) 2022-2023 KAAAsS
|
||||
|
||||
use example_module
|
||||
|
||||
# 注册全部模块
|
||||
export def-env register [] {
|
||||
example_module register
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user