osx - «while read» construction broke ZSH (oh-my-zsh) -


i use zsh oh-my-zsh,

following code broke zsh:

find ... | while read path                                                                                                                          echo "dedug «${path}»" done 

then not builtin scripts , functions broken

❯ invntrm $ whois whois not found  ❯ invntrm $ man man not found  ... 

restart fix problem until run command again.

my setup stock, use omz plugins:

      git                 #·       command-not-found   #·       coffee              #·       encode64            #·       httpie              #·       node                #·       npm                 #·       cp                  # cp progress bar (rsync)       extract             # 'x' alias - swiss knife archive extracting       safe-paste          # no execute immidiately every line # no compatible zsh-autosuggestions :(       fasd                # https://github.com/clvv/fasd - command-line productivity booster, offers quick access files , directories       brew                #·       osx                 # https://github.com/robbyrussell/oh-my-zsh/wiki/plugins#osx       copyfile            # copies selected file content clipboard 

your path environmental variable empty/broken. contains folders use binaries, such echo, man, grep, ffmpeg etc.

check before , after script: echo "$path". on oh-my-zsh works (but use different configuration, of course).

you should raise issue on oh-my-zsh 1 of plugins annuls path.

which 1 - should find out. can try enable-disable them, , check when path change in source code of wrong plugin.

you can update oh-my-zsh. go it's folder , write git pull.


Comments