From bf7347380207d80183ce80ae6547ef08fa579c6a Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Sat, 29 Nov 2025 01:45:07 +0100 Subject: feat: add scripts, TARGET variable for Makefile --- scripts/cht.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/cht.sh (limited to 'scripts/cht.sh') diff --git a/scripts/cht.sh b/scripts/cht.sh new file mode 100755 index 0000000..6c27d29 --- /dev/null +++ b/scripts/cht.sh @@ -0,0 +1,15 @@ +#!/bin/sh +selected=`cat ~/.tmux-langs ~/.tmux-coreutils | fzf` +if [[ -z $selected ]]; then + exit 0 +fi + +read -p "Enter Query: " query + +if grep -qs "$selected" ~/.tmux-langs; then + query=`echo $query | tr ' ' '+'` + tmux neww bash -c "curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done" +else + query=`echo $query | tr ' ' '+'` + tmux neww bash -c "curl cht.sh/$selected~$query & while [ : ]; do sleep 1; done" +fi -- cgit v1.2.3