aboutsummaryrefslogtreecommitdiffstats
path: root/curdel.sh
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-10-11 09:32:01 +0100
committerMatthew Lemon <y@yulqen.org>2023-10-11 09:32:01 +0100
commit77b0f29905e2c1eaa21bf043c3f5c41aa04f4edf (patch)
tree713080f72a536f5e04178d9de1869d8928359924 /curdel.sh
parente30c304663232fde473029d1cbcae50440174696 (diff)
Added three tiny scripts for symbolic links
The idea is to create symlinks to files that are currently being worked on, in one place. Here we can set the link, delete it and list them.
Diffstat (limited to 'curdel.sh')
-rwxr-xr-xcurdel.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/curdel.sh b/curdel.sh
new file mode 100755
index 0000000..e4263cf
--- /dev/null
+++ b/curdel.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+curdir=~/Documents/Notes/current/
+file=$(find $curdir -type l |fzf)
+echo $file
+
+if [[ -d $curdir ]]; then
+ unlink "$file"
+ echo "Deleted symbolic link for $file in $curdir."
+else
+ echo "The ~/Documents/Notes/current directory does not exist. Please create it to proceed."
+ exit 1
+fi