This commit is contained in:
James Dixon 2021-01-19 23:01:42 -05:00
parent f7b0d0b1dd
commit fd3031476f

View File

@ -72,7 +72,7 @@ print_help() {
printf "%s\n" "Options: "
printf "\t%s:\n\t\t%s\n\n" "new-post (aliases: newpost,np,new,n) [post-name]" "create a new post, open editor and live server"
printf "\t%s:\n\t\t%s\n\n" "edit-post (alises: edit,ep,e) [post-name]" "edit a post in the content directory"
printf "\t%s:\n\t\t%s\n\n" "list-post (aliases: list,li,lp,ls,l)" "list all posts in content directory"
printf "\t%s:\n\t\t%s\n\n" "list-posts (aliases: list,li,lp,ls,l)" "list all posts in content directory"
printf "\t%s:\n\t\t%s\n\n" "list-drafts (alises: listdraft,ld)" "list all posts in content directory"
printf "\t%s:\n\t\t%s\n\n" "server (alises: serve,s)" "serve blog from your blog directory"
printf "\t%s:\n\t\t%s\n\n" "kill (alises: killlall,ka,k)" "kill all hugo processes"
@ -99,9 +99,9 @@ while (($#)); do
edit_post "$1"
break
;;
list-post|list|li|lp|l|ls)
# hugo list all | cut -d, -f1 | tail -n +2
hugo list -s "$blog_dir" all | cut -f1,4 -d, | tail -n +2 | tr ',' ' ' | column -t
list-posts|list|li|lp|l|ls)
hugo list -s "$blog_dir" all | cut -d, -f1 | tail -n +2
# hugo list -s "$blog_dir" all | cut -f1,4 -d, | tail -n +2 | tr ',' ' ' | column -t | sort -hr
break
;;
list-drafts|listdraft|ld)