diogocavilha / fancy-git

That's a terminal prompt changer that shows a few cool git informations about your repository state. You can choose among different styles and enjoy all the aliases it provides you. Feel free for contributing, pull requests and issues are always welcome! ;)
GNU General Public License v2.0
477 stars 63 forks source link

Command not found when running from script #126

Open r-shafi opened 2 years ago

r-shafi commented 2 years ago

Everything works from the terminal, but not when running a scrip.

My script:

#!/bin/bash/

fancygit --theme-human
fancygit --disable-time
fancygit --disable-full-path 
fancygit --enable-double-line 

Output: script.sh: line 23: fancygit: command not found

tsadarsh commented 2 years ago

I suppose you are running the script by: ./<your_file>.sh or bash ./<your_file>.sh

Instead, try running the script by sourcing: . ./<your_file>.sh or source ./<your_file>.sh

Did it work? :smile: