19 lines
769 B
Bash
19 lines
769 B
Bash
# 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! 🎉"
|