Add bookmark finder scripts, fix a few incorrect uses of IFS and read
This commit is contained in:
26
src_files/.local/scripts/bookmark-preview-info
Executable file
26
src_files/.local/scripts/bookmark-preview-info
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
IFS="^" read -r bm_name bm_url bm_date_added bm_type bm_comments <<BM_LINE_BLOCK
|
||||
$(printf "%s" "$@")
|
||||
BM_LINE_BLOCK
|
||||
|
||||
bm_preview_format_block=$(cat <<'BM_PREVIEW_FORMAT_BLOCK'
|
||||
name:
|
||||
%s
|
||||
|
||||
url:
|
||||
%s
|
||||
|
||||
date_added:
|
||||
%s
|
||||
|
||||
type:
|
||||
%s
|
||||
|
||||
comments:
|
||||
%s
|
||||
|
||||
BM_PREVIEW_FORMAT_BLOCK)
|
||||
|
||||
printf "$bm_preview_format_block" \
|
||||
"$bm_name" "$bm_url" "$bm_date_added" "$bm_type" "$bm_comments"
|
||||
Reference in New Issue
Block a user