astro

a POSIX shell compatible gemini client (mirror of https://github.com/blmayer/astro)
git clone https://git.clttr.info/astro.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 7044fa74a70756b1950b20940893226c51a834f0
parent 175c6a1f16610bfec3275c5dad29666475d531a1
Author: Brian Mayer <bleemayer@gmail.com>
Date:   Tue, 14 Dec 2021 18:36:30 -0300

Merge pull request #9 from guzzisti/main

move bookmarks file to config dir
Diffstat:
Mastro | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/astro b/astro @@ -258,13 +258,13 @@ fetch() { echo "Enter description: (optional)" read -r desc <&1 url="$1://$2:$3/$4" - echo "$url $desc" >> "$cachedir/bookmarks" + echo "$url $desc" >> "$bookmarkfile" ;; 55) - cat -n "$cachedir/bookmarks" + cat -n "$bookmarkfile" printf "Enter link number: " read -r i <&1 - url="$(sed "${i}q;d" "$cachedir/bookmarks" | cut -d' ' -f1)" + url="$(sed "${i}q;d" "$bookmarkfile" | cut -d' ' -f1)" esac read -r proto host port path << EOF @@ -297,12 +297,19 @@ tput smcup confighome=${XDG_CONFIG_HOME:-$HOME/.config} mkdir -p "$confighome/astro" configfile="$confighome/astro/astro.conf" +bookmarkfile="$confighome/astro/bookmarks" cachehome=${XDG_CACHE_HOME:-$HOME/.cache} mkdir -p "$cachehome/astro" cachedir="$cachehome/astro" histfile="$cachedir/history" +# move old bookmark file to new location +if [ -f "$cachedir/bookmarks" ] && [ ! -f "$bookmarkfile" ] +then + mv "$cachedir/bookmarks" "$bookmarkfile" +fi + LESSKEY="$confighome/astro/less.keys" # Restore terminal