diff --git a/README.md b/README.md index b4e8ec9..6e715d5 100644 --- a/README.md +++ b/README.md @@ -162,3 +162,8 @@ Mon guide à suivre lors d'une réinstallation d'Ubuntu ```bash sudo snap install kolourpaint ``` + +- Installe tldr (bref récap du `man`) + ```bash + wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installTLDR.sh -O tmp.sh && bash tmp.sh; rm tmp.sh + ``` diff --git a/installFish.sh b/installFish.sh index 1d0dfe2..ac29b66 100644 --- a/installFish.sh +++ b/installFish.sh @@ -65,10 +65,10 @@ fish -c "abbr untgz 'tar -xvzf'" fish -c "abbr - 'cd -'" if grep "WSL" /proc/version > /dev/null; # only for WSL then - fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove -y && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" + fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove -y && tldr --update && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" fish -c "abbr d 'explorer.exe .'" else # if regular distro (i.e. Ubuntu) - fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" + fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh && tldr --update && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" fish -c "abbr d 'nautilus . -w &> /dev/null & disown'" fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'" fi diff --git a/installGlobalScript.sh b/installGlobalScript.sh index a7d494f..f1734d8 100644 --- a/installGlobalScript.sh +++ b/installGlobalScript.sh @@ -38,6 +38,9 @@ then git config --global commit.gpgsign true echo -e "\nGPG are now used by default in Git! 🎉" + # Install tldr + bash installTLDR.sh + if grep "Ubuntu" /proc/version > /dev/null; then # Install Brave diff --git a/installTLDR.sh b/installTLDR.sh new file mode 100644 index 0000000..4856ebb --- /dev/null +++ b/installTLDR.sh @@ -0,0 +1,19 @@ +# Install Rust if not already installed +which rustc &> /dev/null || wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/installRust.sh -O - | ( bash; source $HOME/.cargo/env ) + +# Install tldr +cargo install tealdeer + +# Update database +tldr --update + +# Add completion for fish +# Download the file from the latest release... +latest=$(wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest) +url=$(grep 'browser_download_url": ".*/completions_fish"' <<< "$latest" | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }') +wget -q --show-progress $url -O completions_fish + +# Move it to his correct location +mv completions_fish ~/.config/fish/completions/tldr.fish + +echo -e "\ntldr installed! 🎉"