diff options
| author | Deposite Pirate | 2026-02-15 06:38:01 +0100 |
|---|---|---|
| committer | Deposite Pirate | 2026-02-15 06:38:01 +0100 |
| commit | 1b433f995233adcd4f7ca451fadbe5065cdc45fb (patch) | |
| tree | 6a9202807f1bd479ffef7ab7e1eebf5ff2841aea | |
| parent | 059fb78f19d822305183693a84cd22beeb61a841 (diff) | |
Fish function synchronisation
new file: functions/funclnk.fish
| -rw-r--r-- | functions/funclnk.fish | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/functions/funclnk.fish b/functions/funclnk.fish new file mode 100644 index 0000000..2e83b1b --- /dev/null +++ b/functions/funclnk.fish @@ -0,0 +1,20 @@ +function funclnk --description "Synchronise fish functions symlinks" + +set configdir "$HOME/Config" +set fishfuncdir "$__fish_config_dir/functions" + +for script in (find $configdir -type f -path "*/.config/fish/functions/*" -name "*.fish") + set -l basescriptname (path basename $script) + + if test -e "$fishfuncdir/$basescriptname" + continue + end + + if ask "Add a symlink to $basescriptname to fish profile?" + pushd $fishfuncdir + ln -s (realpath --relative-to=. $script) + popd + end +end + +end |
