From 1b433f995233adcd4f7ca451fadbe5065cdc45fb Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 15 Feb 2026 06:38:01 +0100 Subject: Fish function synchronisation new file: functions/funclnk.fish --- functions/funclnk.fish | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 functions/funclnk.fish 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 -- cgit v1.3.1