From a1e7e0bc3e2cf040d24580ecfe3f73899b358aa1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 20 Aug 2023 06:52:48 +0200 Subject: fish: port functions and more aliases --- user/settings/fish/functions/delink.fish | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 user/settings/fish/functions/delink.fish (limited to 'user/settings/fish/functions/delink.fish') diff --git a/user/settings/fish/functions/delink.fish b/user/settings/fish/functions/delink.fish new file mode 100644 index 00000000..ff7ff64b --- /dev/null +++ b/user/settings/fish/functions/delink.fish @@ -0,0 +1,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 -- cgit 1.4.1