Updated zsh config

This commit is contained in:
2023-10-07 23:08:42 -04:00
parent a3c3ed1d23
commit 30ff7b7652
8 changed files with 66 additions and 58 deletions

View File

@@ -27,8 +27,8 @@ zparseopts -- \
#################### Main ####################
if [ -d "$HOME/projects/github.com/m-housh/mhoush.com" ]; then
root="$HOME/projects/github.com/m-housh/mhoush.com"
if [ -d "$GHREPOS/mhoush.com" ]; then
root="$$GHREPOS/mhoush.com"
else
root="$HOME/projects/mhoush.com"
fi

View File

@@ -7,7 +7,7 @@ test ! -n "${SCRIPTS}" && echo "SCRIPTS not set" && exit 1;
# fallback to check if the name arg ${1} exists, if not show usage text.
test ! -n "${1}" && \
echo "usage: newscript <name> <optional: shell>" && \
echo "usage: newx <name> <optional: shell>" && \
echo "shell defaults to sh if not supplied" && \
exit 1;

View File

@@ -81,4 +81,5 @@ if ! tmux has-session -t "$selected_name" 2> /dev/null; then
tmux new-session -ds "$selected_name" -c "$selected"
fi
tmux switch-client -t "$selected_name"
[ -z $TMUX ] && tmux attach -t "$selected_name" \
|| tmux switch-client -t "$selected_name"