Added optinal clipboard support
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
# - status bar with currently opened resource name
|
||||
# - ability to accept gopher:// URLs from the command line
|
||||
# - ability to save the URL to the currently viewed resource into the stash text file
|
||||
# - optional clipboard support when stashing (only if you set BOPHER_CLIP envvar)
|
||||
# - ability to force-download pages instead of viewing regardless of their type
|
||||
# - displaying type 8 entries (as per RFC1436) as the telnet:// URI scheme
|
||||
|
||||
@@ -312,6 +313,7 @@ stashlink() { # stash the link to the currently viewed resource
|
||||
[[ -z "$desc" ]] && desc='Unnamed'
|
||||
printf '%s [%s] %s - %s\t%s\t%s\t%s\r\n' "${fields[5]}" "$(date -u '+%F %T')" "$desc" "$gopherlink" "${fields[4]}" "${fields[2]}" "${fields[3]}" >> $BOPHER_LINKSTASH
|
||||
printf 'Stashed %s - %s%s' "$desc" "$gopherlink" "$ERESET${ESC}[$TERMROWS;0H" # just reset the cursor to the last line
|
||||
[[ ! -z "$BOPHER_CLIP" ]] && (printf '%s' "$gopherlink" | $BOPHER_CLIP) # run an external clipboard command if it's explicitly specified
|
||||
}
|
||||
|
||||
# Focus and click a link on a Gophermap
|
||||
|
||||
Reference in New Issue
Block a user