samtay / tetris

A terminal interface for Tetris
Other
871 stars 40 forks source link

zsh: command not found: tetris #9

Closed jeanluc243 closed 4 years ago

jeanluc243 commented 4 years ago

tetris command not found when you are using ZSH inspite of BASH

samtay commented 4 years ago

Without more information, I suspect this is not due to zsh versus bash. It sounds like tetris either isn't installed or isn't on your PATH. You can check if it's installed and on your PATH by running the command which tetris. If this command errors, just move tetris to a more appropriate location (or add to your PATH in your .zshrc)

What is your installation method? Please post the commands you used up to and including the error.

jeanluc243 commented 4 years ago

i have installed tetris through snap but tetris is available when i use BASH , tetris is avalaible but when i use ZSH

samtay commented 4 years ago

I see. The problem is probably that snap installs things to a directory that your .bashrc adds to the PATH, but your .zshrc does not. If this is the problem, what you should do is:

  1. Enter a bash shell
  2. Run which tetris which will output /some/directory/tetris
  3. Add export PATH="/some/directory:$PATH" to your .zshrc

Then load up a new zsh shell and try running tetris :crossed_fingers:

samtay commented 4 years ago

@jeanluc243 did you have any luck? I'd like to close this issue, since I'm like 99% sure the above comment will fix this problem. (And because I also use zsh.)

jeanluc243 commented 4 years ago

I see. The problem is probably that snap installs things to a directory that your .bashrc adds to the PATH, but your .zshrc does not. If this is the problem, what you should do is:

  1. Enter a bash shell
  2. Run which tetris which will output /some/directory/tetris
  3. Add export PATH="/some/directory:$PATH" to your .zshrc

Then load up a new zsh shell and try running tetris

It Works ... Thanks