lb

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ac3706357f28b43ae7d4de43d85f437eccfe5c4f
parent 87046cffe94904f46f2d812f8ce69eae1404558b
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Wed, 17 Oct 2018 10:56:19 -0400

listandReturn individuated

Diffstat:
Mlb | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lb b/lb @@ -49,7 +49,6 @@ postNew() { \ } finalize() { \ - listandReturn "$draftdir" finalize url=$(grep -o "<h2 id='\(.\)*'>" "$draftdir"/"$chosen" | cut -d "'" -f2) title=$(grep -o "<h2 id='\(.\)*h2>" "$draftdir"/"$chosen" | sed -e 's/<[^>]*>//g') echo "AddDescription \"$title\" $chosen" >> "$blogdir"/.htaccess @@ -69,7 +68,6 @@ finalize() { \ } delete() { \ - listandReturn "$blogdir/*.html" delete base=$(basename $(echo "$chosen" | cut -f1 -d'.')) read -rp "Really delete \"$base\"? (y/N) " choice [[ $choice =~ [Yy] ]] || exit @@ -80,7 +78,6 @@ delete() { \ } discard() { \ - listandReturn "$draftdir/*.html" discard base=$(echo "$chosen" | cut -f1 -d'.') read -rp "Really discard \"$(basename $chosen)\"? (y/N) " choice [[ $choice =~ [Yy] ]] || exit @@ -89,9 +86,9 @@ discard() { \ case "$1" in new) getTitle && postNew ;; - discard) discard ;; - finalize) finalize ;; - delete) delete ;; + discard) listandReturn "$draftdir/*.html" discard && discard ;; + finalize) listandReturn "$draftdir" finalize && finalize ;; + delete) listandReturn "$blogdir/*.html" delete && delete ;; edit) listandReturn "$draftdir/*.html" edit && vim "$chosen" ;; *) getHelp ;; esac