CL auto completion for bash not working
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
cc @marchersimon
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.
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
@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 https://github.com/tldr-pages/tldr/pull/6087).
Also, I'm wondering which system this is indented for. I've never seen a bin folder inside the home directory on Linux.