automate/020_tldr-broken.sh

53 lines
1.4 KiB
Bash

#!/usr/bin/env bash
sudo apt -y install tldr-py fzf
TLDR_CONFIG_DIR=${HOME}/.tldr
#mkdir -p ${TLDR_CONFIG_DIR}
cd ${HOME}
git clone https://github.com/tldr-pages/tldr.git .tldr
cat > ${HOME}/.zsh_aliases.d/003_tldr.zsh <<EOF
if [ -x /usr/bin/tldr ]; then
alias howto="tldr find"
alias fhowto="tldr list | fzf | xargs -I{} tldr find {}"
EOF
cat > ${HOME}/.tldrrc <<'EOF'
"pagesRepository": "https://github.com/tldr-pages/tldr"
"repository": "https://tldr-pages.github.io/assets/tldr.zip"
"themes":
"simple":
"commandName": "bold, underline"
"mainDescription": "bold"
"exampleDescription": ""
"exampleCode": ""
"exampleToken": "underline"
"base16":
"commandName": "bold"
"mainDescription": ""
"exampleDescription": "green"
"exampleCode": "red"
"exampleToken": "cyan"
"ocean":
"commandName": "bold, cyan"
"mainDescription": ""
"exampleDescription": "green"
"exampleCode": "cyan"
"exampleToken": "dim"
"inverse":
"commandName": "bold, inverse"
"mainDescription": "inverse"
"exampleDescription": "black"
"exampleCode": "inverse"
"exampleToken": "green, bgBlack, inverse"
"matrix":
"commandName": "bold",
"mainDescription": "underline"
"exampleDescription": "green, bgBlack"
"exampleCode": "green, bgBlack"
"exampleToken": "green, bold, bgBlack"
"theme": "ocean"
"platform": "linux"
EOF