tomnomnom/gf

bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory

JordRoest opened this issue ยท 16 comments

root@kali:~# source ~/.bashrc
bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory
bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory
bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory
bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory

@kalihackerCD43
your path for completion.bash is wrong!
it should be something like this:
/root/go/src/github.com/tomnomnom/gf/gf-completion.bash
where /root/go is your $GOPATH (it can be different in your case)

happy hacking!

Thanks @unstabl3 ! its work, but if I open a new terminal than i get this:
bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory How can i fix this?

@kalihackerCD43, first of all, it would be good if you give some more details.
it looks like you are exporting it multiple times which you should not!
From the above errors, I can only tell you that you are not exporting "completion bash" with $GOPATH.
Also, read my previous comment again! (if you have used "go get" command to install you can find it under /root/go/...)
have a nice day!

this happen if i open a new terminal tab or open an new terminal
Screenshot from 2020-01-08 09-58-07

@kalihackerCD43
All my previous comments are good enough to solve this issue..

hi iam also getting same problem i dont know why

  1. go get -u github.com/tomnomnom/gf
  2. echo 'source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc
  3. source ~/.bashrc
    now i am getting
    bash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory
    this error in terminal
    bash
    bash1

Hi,
This happened because your $GOPATH is not set!
two simple fixes for this

  1. Set your GOPATH
  2. and/or add the following line in your /root/.bashrc file
    source /root/go/src/github.com/tomnomnom/gf/gf-completion.bash
    ps: either add or replace your command with the above command.
    I hope this will help!

-shubham

echo 'source /root/go/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc
solved

echo 'source $GOPATH/root/go/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc
Sloved

I am installing this in Windows 10.
This error is showing , how to resolve this $GOPATH what will come here ?
1

nano .bashrc
add to # like this ( #source $GOPATH/root/go/src/github.com/tomnomnom/gf/gf-completion.bash )

Hello, this worked for me
locate /go/src/ --> /usr/local/go/src/ <=== this is my go/src location
and i added this to my .bashrc : source /usr/local/go/src/gf/gf-completion.bash
After that you have to create directory ".gf" in home and then copy the patterns

Works in Ubuntu 20.04

For new version go:

go install -v github.com/tomnomnom/gf@latest

updatedb
locate gf-completion.bash

Get the real path
and then change the path of gf-completion.bash in ~/.bashrc

c4ir0 commented

For new version go:

go install -v github.com/tomnomnom/gf@latest

updatedb
locate gf-completion.bash

Get the real path and then change the path of gf-completion.bash in ~/.bashrc

thx this really helped