all repos — nixfiles @ 022a3a897e5311fbc94accb2d4f6589e4d89a8ce

System and user configuration, managed by nix and home-manager

user/settings/fish/functions/delink.fish (view raw)

1
2
3
4
5
6
7
8
9
10
function delink
    if test ! -L $argv[1]
        echo "$argv[1] is not a symlink"
        return 1
    end
    set -l src (readlink $argv[1])
    rm $argv[1]
    cp $src $argv[1]
    chmod u+w $argv[1]
end