use env for BLOG_DIR for other shells
This commit is contained in:
parent
5eab5dbad3
commit
0f3f1a0c6b
@ -79,6 +79,7 @@ alias ltmrc="$EDITOR ~/.local/.tmux.conf"
|
||||
alias gitrc="$EDITOR ~/.gitconfig"
|
||||
|
||||
# hugo
|
||||
# BLOG_DIR should be set in local env
|
||||
# BLOG_DIR="$HOME/Code/lemonase.github.io/"
|
||||
hugo-cd() { cd $BLOD_DIR; }
|
||||
hugo-lp() { cd $BLOG_DIR && hugo list all; }
|
||||
|
||||
@ -103,6 +103,7 @@ alias ungzip="gunzip"
|
||||
# Functions *
|
||||
# * * * * * *
|
||||
|
||||
|
||||
# concat common commands
|
||||
mkcd() { mkdir -p -- "$1" && cd "$1"; }
|
||||
cdd() { [ -n "$1" ] && for i in $(seq 1 "$1"); do cd ..; done; }
|
||||
@ -311,6 +312,18 @@ if command -v cargo >/dev/null; then
|
||||
src_rust
|
||||
fi
|
||||
|
||||
# hugo
|
||||
# BLOG_DIR should be set in local env
|
||||
hugo-cd() { cd $BLOD_DIR; }
|
||||
hugo-lp() { cd $BLOG_DIR && hugo list all; }
|
||||
hugo-ls() { hugo-lp | sed 1d | awk -F',' '{print $1, $(NF-4)}' | column -t; }
|
||||
hugo-fzf() { hugo-ls | fzf | awk '{print $1}'; }
|
||||
|
||||
hugo-np() { cd $BLOG_DIR && hugo new posts/$1.md; }
|
||||
hugo-npe() { hugo-np $1 && $EDITOR $BLOG_DIR/content/posts/$1.md; }
|
||||
hugo-rm() { rm "$BLOG_DIR/content/posts/$1.md"; }
|
||||
hugo-ed() { $EDITOR $(hugo-fzf); }
|
||||
|
||||
# * * * * * * * * * * * *
|
||||
# MISC $PATH Additions *
|
||||
# * * * * * * * * * * * *
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user