cheatsheet command
This commit is contained in:
parent
861a697e0f
commit
ba690803c0
1 changed files with 13 additions and 0 deletions
13
.local/bin/misc/chtsh
Executable file
13
.local/bin/misc/chtsh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
languages=$(echo "react nextjs javascript python java golang c cpp typescript rust" | tr " " "\n")
|
||||
core_utils=$(echo "find xargs sed awk" | tr " " "\n")
|
||||
selected=$(echo -e "$languages\n$core_utils" | fzf)
|
||||
|
||||
read -p "What you want to learn: " query
|
||||
|
||||
if echo "$languages" | grep -qs $selected; then
|
||||
curl cht.sh/$selected/$(echo "$query" | tr " " "+")
|
||||
else
|
||||
curl cht.sh/$selected~$query
|
||||
fi
|
Loading…
Reference in a new issue