Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CL auto completion for bash not working #357

Open
j-tesla opened this issue May 25, 2021 · 4 comments
Open

CL auto completion for bash not working #357

j-tesla opened this issue May 25, 2021 · 4 comments
Labels

Comments

@j-tesla
Copy link

j-tesla commented May 25, 2021

Expected behaviour

Command-line auto-completion to work.

Actual behaviour

According to README.md , I made a soft link (ln -s bin/completion/bash/tldr ~/.tldr-completion.bash ). But the file bin/completion/bash/tldr does not exist.

Log, debug output

bash: /home/j-tesla/.tldr-completion.bash: No such file or directory

Environment

  • Operating system - Pop OS! 20.04
  • NodeJS version - v14.17.0
@bl-ue
Copy link
Contributor

bl-ue commented Jun 21, 2021

cc @marchersimon

@marchersimon
Copy link
Contributor

marchersimon commented Jun 21, 2021

Hey @j-tesla, I don't know why this path is in the README, but my completion files are under /usr/lib/node_modules/tldr/bin/completion/bash/. (Using Manjaro, probably doesn't matter tough)

Basically, you created an invalid symlink and now bash is complaining.

@bl-ue
Copy link
Contributor

bl-ue commented Jun 21, 2021

Oh, I wonder if the symlink ~/.tldr-completion.bash is just pointing to the relative path bin/completion/bash/tldr, so it will only work if <you current working directory>/bin/completion/bash/tldr exists.

@j-tesla Try re-running your ln command except use the full absolute path as the first argument, e.g. /usr/lib/node_modules/tldr/bin/completion/bash/tldr

@marchersimon
Copy link
Contributor

@bl-ue it's not <you current working directory>/bin/completion/bash/tldr, but <location of the symlink>/bin/completion/bash/tldr. But it's still bad practice to not specify the full path in such a case. (See tldr-pages/tldr#6087).

Also, I'm wondering which system this is indented for. I've never seen a bin folder inside the home directory on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants