save
This commit is contained in:
0
scripts/cht/tmux-cht-command
Normal file
0
scripts/cht/tmux-cht-command
Normal file
0
scripts/cht/tmux-cht-lang
Normal file
0
scripts/cht/tmux-cht-lang
Normal file
14
scripts/cht/tmux-cht.sh
Executable file
14
scripts/cht/tmux-cht.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
selected=`cat ~/scripts/tmux-cht-languages ~/scripts/tmux-cht-command | fzf`
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "Enter Query: " query
|
||||
|
||||
if grep -qs "$selected" ~/.tmux-cht-languages; then
|
||||
query=`echo $query | tr ' ' '+'`
|
||||
tmux neww bash -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
|
||||
else
|
||||
tmux neww bash -c "curl -s cht.sh/$selected~$query | less"
|
||||
fi
|
||||
Reference in New Issue
Block a user