diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-07 16:41:08 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-07 16:57:24 +0800 |
| commit | cc76b514a96331ca852d5a6cb1efabb72163722d (patch) | |
| tree | 8ac171df0a9ff4c9c9c93f5cfe2eea76a8b83a3a /mingling_cli/scripts/load_mling.fish | |
| parent | 81aa8266886d0dfb2961a9035a6f0b811b98be4f (diff) | |
build: replace cargo install with local release build in scripts
Update install scripts to build from manifest and copy binaries
manually instead of using `cargo install`. Add load scripts for
bash, zsh, fish, and PowerShell to set up PATH and source
completion scripts from external packages.
Diffstat (limited to 'mingling_cli/scripts/load_mling.fish')
| -rw-r--r-- | mingling_cli/scripts/load_mling.fish | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mingling_cli/scripts/load_mling.fish b/mingling_cli/scripts/load_mling.fish new file mode 100644 index 0000000..ea8f1ff --- /dev/null +++ b/mingling_cli/scripts/load_mling.fish @@ -0,0 +1,23 @@ +#!/usr/bin/env fish + +set -g MLING_SCRIPT_DIR (path dirname (path resolve (status --current-filename))) + +if not contains -- "$MLING_SCRIPT_DIR/bin" $PATH + set -gx PATH "$MLING_SCRIPT_DIR/bin" $PATH +end + +if test -f "$MLING_SCRIPT_DIR/scripts/mling_comp.fish" + source "$MLING_SCRIPT_DIR/scripts/mling_comp.fish" +end + +for pkg_dir in (mingling-cli __loadpkgs_path 2>/dev/null | string split '\n' | string match -rv '^$') + if test -d "$pkg_dir"; and not contains -- "$pkg_dir" $PATH + set -gx PATH "$pkg_dir" $PATH + end +end + +for script in (mingling-cli __loadpkgs_comp_scripts 2>/dev/null | string split '\n' | string match -rv '^$') + if string match -q '*.fish' -- "$script"; and test -f "$script" + source "$script" + end +end |
