mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 06:32:03 +00:00
Use dotter
This commit is contained in:
15
local/bin/chtsh
Executable file
15
local/bin/chtsh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
selected=$(cat ~/.config/tmux/tmux-cht-languages ~/.config/tmux/tmux-cht-command | fzf)
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "Enter Query: " query
|
||||
|
||||
if rg -qs "$selected" ~/.config/tmux/tmux-cht-languages; then
|
||||
query=$(echo $query | tr ' ' '+')
|
||||
tmux neww zsh -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
|
||||
else
|
||||
tmux neww zsh -c "curl -s cht.sh/$selected~$query | less"
|
||||
fi
|
||||
Reference in New Issue
Block a user