feat: --list option to list entries and exit
This commit is contained in:
@@ -112,7 +112,9 @@ __new() {
|
||||
collection=$(printf "%s" "$COLLECTION_LABELS" |
|
||||
tr ';' '\n' |
|
||||
$FZF \
|
||||
--ansi \
|
||||
--prompt="Choose collection> " \
|
||||
--select-1 \
|
||||
--no-sort \
|
||||
--tac \
|
||||
--margin="30%,30%" \
|
||||
@@ -146,6 +148,9 @@ __new() {
|
||||
while [ "$checksum" != "$(cksum "$tmpmd")" ]; do
|
||||
tmpfile="$tmpmd.ics"
|
||||
if awk -v uid="$uuid" "$AWK_NEW" "$tmpmd" >"$tmpfile"; then
|
||||
if [ ! -d "$ROOT/$collection" ]; then
|
||||
mkdir -p "$ROOT/$collection"
|
||||
fi
|
||||
mv "$tmpfile" "$file"
|
||||
if [ -n "${GIT:-}" ]; then
|
||||
$GIT add "$file"
|
||||
|
||||
Reference in New Issue
Block a user