Command line accessible
Closed this issue · 9 comments
Can you add the feature to call the script from the bash without the need to clone the repo.
wget https://raw.githubusercontent.com/sdushantha/gitdir/master/gitdir/gitdir -O ~/bin/gitdir && chmod u+x ~/bin/gitdir; # ;)
@jasteele12 That works very well!
@MohamedAliRashad
If you have pip
installed, then you can do this:
pip install --user gitdir
Then you run gitdir
like a normal command :)
@sdushantha
I tried using this solution on colab but it raised this error.
/bin/bash: gitdir: command not found
@MohamedAliRashad
If you installed it with this command:
pip install --user gitdir
Then the script should be located in $HOME/.local/bin/
Also, you might need to add $HOME/.local/bin/
to your PATH
in your .bashrc
Like this:
export PATH=$PATH":$HOME/.local/bin"
Didn't work also ....
@MohamedAliRashad Are you on MacOS or Linux?
I have had a similar problem before on my MacOS laptop and the only way I was able to run scripts installed with pip
, was to run the script like this:
$ #python3 -m ModuleNameHere
$ python3 -m gitdir
If the above solution works for you, then you could make an alias
so that you dont have to write the very long command.
# Add this to .bashrc
alias gitdir=python3 -m gitdir
# Then you will be able to run this from anywhere
$ gitdir
If you are on Linux, I dont really know what the problem might be, you could try the solution above and see if it works with Linux. Ive been using Linux daily and have never encountered a problem like this.
@sdushantha
I am trying to use this on colab and still gives me the same error.
it works on my local machine like a charm but it just doesn't want to work on my notebook.
/usr/bin/python3: No module named gitdir
@MohamedAliRashad I am really sorry, but I have no idea why this is happening.
When you find a solution, please share it :)
@MohamedAliRashad It looks like it must be a environment issue. I am going to close this issue, just to keep everything clean, but please let me know when you find fix :)