Skip to content

Commit

Permalink
Fix gsed over bsed and pretty_path for spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Jul 17, 2024
1 parent 2552600 commit 10623a5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 10623a5

Please sign in to comment.