From 0e31f2d7b53bf8e80b4b94bc553afcb168036b6b Mon Sep 17 00:00:00 2001 From: James Dixon Date: Sun, 16 Mar 2025 02:26:30 -0400 Subject: [PATCH] add interactive clean alias --- config/bash/.local/bin/hu | 9 +++------ config/git/.gitconfig | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/bash/.local/bin/hu b/config/bash/.local/bin/hu index fd13c27..dd486e5 100755 --- a/config/bash/.local/bin/hu +++ b/config/bash/.local/bin/hu @@ -5,8 +5,7 @@ # Relies on BLOG_DIR to be set from environment hu() { - cd "$BLOG_DIR" - + echo "$BLOG_DIR" if [ "$1" == "np" ]; then POST_NAME="$2" if [ -z "$POST_NAME" ]; then @@ -20,14 +19,12 @@ hu() { fi if [ "$1" == "ls" ]; then - cd "$BLOG_DIR" && hugo list all | sed 1d | awk -F',' '{print $1, $(NF-4)}' | column -t + hugo list all -s "$BLOG_DIR" | sed 1d | awk -F',' '{print $1, $(NF-4)}' | column -t fi if [ "$1" == "fzf" ]; then - cd "$BLOG_DIR" && hugo list all | sed 1d | awk -F',' '{print $1, $(NF-4)}' | column -t | fzf | awk '{print $1}' + hugo list all -s "$BLOG_DIR" | sed 1d | awk -F',' '{print $1, $(NF-4)}' | column -t | fzf | awk '{print $1}' fi - - $SHELL } hu "$@" diff --git a/config/git/.gitconfig b/config/git/.gitconfig index 9f4988f..cdf85ad 100644 --- a/config/git/.gitconfig +++ b/config/git/.gitconfig @@ -32,6 +32,7 @@ cam = commit -am co = checkout cob = checkout -b + cl = clean -i br = branch d = diff df = diff