From 10623a529c6d42ae161191be099aacee9ec9e71d Mon Sep 17 00:00:00 2001 From: Max O'Cull Date: Tue, 16 Jul 2024 22:39:33 -0400 Subject: [PATCH] Fix gsed over bsed and pretty_path for spaces --- .zshrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 9b7f7fd..087a573 100644 --- a/.zshrc +++ b/.zshrc @@ -720,7 +720,9 @@ zshrc_set_path() { echo "Precedence order of directories in PATH:" index=1 - for dir in "$@"; do + while [ $# -gt 0 ]; do + dir=$1 + shift if [ -n "$dir" ]; then echo "$index) $dir" index=$((index + 1)) @@ -765,7 +767,12 @@ zshrc_set_path() { fi if type gsed > /dev/null 2>&1; then - alias sed='gsed' + # Make the gsed application universal for this system! + if [ ! -e "${HOME}/.local/bin/sed" ]; then + mkdir -p "${HOME}/.local/bin" + ln -s "$(command -v gsed)" "${HOME}/.local/bin/sed" + echo "NOTE: GNU gsed is now linked to sed in ${HOME}/.local/bin; you are no longer using BSD sed!" + fi fi fi