Add tldr
This commit is contained in:
parent
f8ed09c8dc
commit
b35be562d4
4 changed files with 29 additions and 2 deletions
|
@ -162,3 +162,8 @@ Mon guide à suivre lors d'une réinstallation d'Ubuntu
|
||||||
```bash
|
```bash
|
||||||
sudo snap install kolourpaint
|
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
|
||||||
|
```
|
||||||
|
|
|
@ -65,10 +65,10 @@ fish -c "abbr untgz 'tar -xvzf'"
|
||||||
fish -c "abbr - 'cd -'"
|
fish -c "abbr - 'cd -'"
|
||||||
if grep "WSL" /proc/version > /dev/null; # only for WSL
|
if grep "WSL" /proc/version > /dev/null; # only for WSL
|
||||||
then
|
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 .'"
|
fish -c "abbr d 'explorer.exe .'"
|
||||||
else # if regular distro (i.e. Ubuntu)
|
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 d 'nautilus . -w &> /dev/null & disown'"
|
||||||
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
|
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -38,6 +38,9 @@ then
|
||||||
git config --global commit.gpgsign true
|
git config --global commit.gpgsign true
|
||||||
echo -e "\nGPG are now used by default in Git! 🎉"
|
echo -e "\nGPG are now used by default in Git! 🎉"
|
||||||
|
|
||||||
|
# Install tldr
|
||||||
|
bash installTLDR.sh
|
||||||
|
|
||||||
if grep "Ubuntu" /proc/version > /dev/null;
|
if grep "Ubuntu" /proc/version > /dev/null;
|
||||||
then
|
then
|
||||||
# Install Brave
|
# Install Brave
|
||||||
|
|
19
installTLDR.sh
Normal file
19
installTLDR.sh
Normal file
|
@ -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! 🎉"
|
Reference in a new issue