ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.55k stars 626 forks source link

on Mac initial setup, there is "syntax error near unexpected token `&" on .oh-my-bash/aliases/general.aliases.sh #431

Closed curiouslaw closed 1 year ago

curiouslaw commented 1 year ago

Hi all,

I'm on Mac with bash "version 3.2.57(1)-release (x86_64-apple-darwin22)".

After running these steps:

  1. bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
  2. adding bashrc on my ~/.bash_profile with this code below:
    if [[ -f ~/.bashrc ]]; then
    source ~/.bashrc
    fi

I got this error when opening my terminal -bash: /Users/<username>/.oh-my-bash/aliases/general.aliases.sh: line 55: syntax error near unexpected token `&'

this error will be gone if I change |& to |, in ~/.oh-my-bash/aliases/general.aliases.sh file, line 55. See visual below:

Screenshot 2023-04-06 at 10 16 14 AM

Let me know if you guys need any info *For now, I commit the & symbols in the nano pipe command

akinomyoga commented 1 year ago

Thank you for the report! I pushed a fix 0e9f0e7. Could you check the latest version?

curiouslaw commented 1 year ago

hi @akinomyoga, the fix works like a charm! Thanks (and good work) for the fix :).

akinomyoga commented 1 year ago

Thank you for checking!

I'm closing the issue. Thank you again for opening the issue.