Documentation

This commit is contained in:
Nox Sluijtman 2023-11-30 15:46:01 +01:00
parent 7a16b51b8d
commit 005a022307
4 changed files with 43 additions and 1 deletions

View file

@ -19,6 +19,7 @@ addUrl(){
"$(curl -s "$url" | grep '<title' | sed 's/<title>\(.*\)<\/title>/\1/')" \
>> $bookmarks
fi
printf "added '%s' to '%s'" "$url" "$bookmarks"
}
while getopts chu: flag; do

View file

@ -0,0 +1,8 @@
#compdef _add-bookmark add-bookmark
_arguments : \
"(-u -h)-c[take url from clipboard]" \
"(-c -h)-u[url as argument]:bookmark url:" \
"(-u -c)-h[print usage and exit]"
_arguments : $arguments

View file

@ -0,0 +1,29 @@
add-bookmark(1)
# NAME
*add-bookmark* - adds a bookmark to *qutebrowser(1)* bookmarks file.
# SYNOPSIS
*copy-bookmark -u|h|c*
# DESCRIPTION
*qutebrowser(1)* saves its bookmarks in
'*~/.config/qutebrowser/bookmarks/urls*'.
This is a script to be able to add bookmarks to that file without launching
qutebrowser.
# OPTIONS
*-u*
URL given as argument
*-c*
URL read from clipboard
*-h*
print usage and exit
# SEE ALSO
*qutebrowser(1)*, *xclip(1)*

View file

@ -27,6 +27,10 @@ both problems.
Adds a bookmark to clipboard using *xclip(1)*, see its own manpage for more
information
*add-bookmark*
Adds a bookmark to *qutebrowser(1)*'s list of bookmarks
# SEE ALSO
*open-bookmark(1)*, *xdg-open(1)*, *xclip(1)*
*open-bookmark(1)*, *copy-bookmark(1)*, *add-bookmark(1)*, *xdg-open(1)*,
*xclip(1)*