mrss.sh: allow using select/fzf on already-read articles
This commit is contained in:
parent
7d1c7a7a38
commit
7e453c89e0
@ -121,7 +121,7 @@ list_read() {
|
|||||||
list_watchlater() {
|
list_watchlater() {
|
||||||
while read -r ARTICLE; do
|
while read -r ARTICLE; do
|
||||||
REALPATH="$(realpath "$ARTICLE")"
|
REALPATH="$(realpath "$ARTICLE")"
|
||||||
sub_purge "$art"
|
sub_purge "$ARTICLE"
|
||||||
ln -sr "$REALPATH" "$MRSS_WATCH_LATER"/
|
ln -sr "$REALPATH" "$MRSS_WATCH_LATER"/
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ sub_select() {
|
|||||||
else
|
else
|
||||||
DIR="$MRSS_DIR/$1"
|
DIR="$MRSS_DIR/$1"
|
||||||
fi
|
fi
|
||||||
NEWARTS="$(find "$DIR" -type l)"
|
NEWARTS="$(find "$DIR" -type l -or -type f)"
|
||||||
TOTAL_COUNT="$(printf "%s" "$NEWARTS" | wc -l)"
|
TOTAL_COUNT="$(printf "%s" "$NEWARTS" | wc -l)"
|
||||||
printf "%s" "$NEWARTS" | (
|
printf "%s" "$NEWARTS" | (
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ sub_fzf() {
|
|||||||
fi
|
fi
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
while true; do
|
while true; do
|
||||||
NEWARTS="$(find . -type l)"
|
NEWARTS="$(find . -type l -or -type f)"
|
||||||
export -f sub_preview
|
export -f sub_preview
|
||||||
SEL="$(printf "%s" "$NEWARTS" | fzf --disabled --marker='*' --multi --cycle --preview 'bash -c "sub_preview {}"')"
|
SEL="$(printf "%s" "$NEWARTS" | fzf --disabled --marker='*' --multi --cycle --preview 'bash -c "sub_preview {}"')"
|
||||||
if [ -z "$SEL" ]; then
|
if [ -z "$SEL" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user