diff options
Diffstat (limited to '')
-rwxr-xr-x | curdel.sh | 13 | ||||
-rwxr-xr-x | curlist.sh | 10 | ||||
-rwxr-xr-x | curset.sh | 13 |
3 files changed, 36 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 diff --git a/curlist.sh b/curlist.sh new file mode 100755 index 0000000..6720b91 --- /dev/null +++ b/curlist.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +curdir=~/Documents/Notes/current/ + +if [[ -d $curdir ]]; then + ls "$curdir/" +else + echo "The ~/Documents/Notes/current directory does not exist. Please create it to proceed." + exit 1 +fi diff --git a/curset.sh b/curset.sh new file mode 100755 index 0000000..8d80605 --- /dev/null +++ b/curset.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +file=$(find ~/Documents/Notes -type f|fzf) +curdir=~/Documents/Notes/current/ + +if [[ -d $curdir ]]; then + ln -s "$file" "$curdir" + echo "Created symbolic link for $file in $curdir." +else + echo "The ~/Documents/Notes/current directory does not exist. Please create it to proceed." + exit 1 +fi + |