From 46fd8d0fef8957aee68e28c55fa9e117586a99d5 Mon Sep 17 00:00:00 2001 From: Davide Zipeto Date: Mon, 25 Nov 2019 11:11:55 +0100 Subject: [PATCH 1/2] add linux/debian instructions --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 9594654..bdab510 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,44 @@ $ curl -o "${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash 4. Restart Terminal. +### Installation on Debian based Linux [Ubuntu/Mint/others] + +Usually the completion files are installed under /etc/bash_completion.d when installing a package as *root*. However for user user completion a using the home folder would ensure portability in case of system reinstallation. + +1. Ensure that `bash` version ^4.x.x is **installed**. It should be by the default on any recent distribution. Check with: + + ```bash + bash --version + ``` + +2. Create a directory in your home folder to host the yarn completion: + + ```bash + mkdir $HOME/.config/yarn-completion/ + ``` + +3. Copy the `yarn-completion` from the repo in the created directory + ```bash + curl -o "$HOME/.config/yarn-completion/yarn" https://raw.githubusercontent.com/dsifford/yarn-completion/master/yarn-completion.bash + ``` + +4. Create a custom completions launcher file if not already present `~/.bash_completion` + + +5. Add the reference to the yarn completion in the `~/.bash_completion` file + ```bash +# Yarn Completion +if [ -f ~/.config/yarn-completion/yarn ]; then + source ~/.config/yarn-completion/yarn +fi + ``` +6. Restart the terminal or source the completion file to have it working without restart: + +```bash +source ~/.bash_completion +``` + + ## FAQ > Will you support bash 3? From 3151dec832d30a0bf092d3d031cbbb229972a003 Mon Sep 17 00:00:00 2001 From: Davide Z Date: Mon, 25 Nov 2019 11:14:51 +0100 Subject: [PATCH 2/2] typo --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bdab510..aa7e4ba 100644 --- a/README.md +++ b/README.md @@ -68,16 +68,16 @@ Usually the completion files are installed under /etc/bash_completion.d when ins 5. Add the reference to the yarn completion in the `~/.bash_completion` file ```bash -# Yarn Completion -if [ -f ~/.config/yarn-completion/yarn ]; then - source ~/.config/yarn-completion/yarn -fi + # Yarn Completion + if [ -f ~/.config/yarn-completion/yarn ]; then + source ~/.config/yarn-completion/yarn + fi ``` 6. Restart the terminal or source the completion file to have it working without restart: -```bash -source ~/.bash_completion -``` + ```bash + source ~/.bash_completion + ``` ## FAQ