uff
This commit is contained in:
@@ -7,3 +7,4 @@ source $(dirname "$0")/functions/rn.zsh;
|
||||
source $(dirname "$0")/functions/sum.zsh;
|
||||
source $(dirname "$0")/functions/mke.zsh;
|
||||
source $(dirname "$0")/functions/myip.zsh;
|
||||
source $(dirname "$0")/functions/cht.zsh;
|
||||
|
13
configs/zsh/functions/cht.zsh
Normal file
13
configs/zsh/functions/cht.zsh
Normal file
@@ -0,0 +1,13 @@
|
||||
languages=`echo "golang lua cpp c typescript nodejs" | tr ' ' '\n'`
|
||||
core_utils=`echo "xargs find mv sed awk" | tr ' ' '\n'`
|
||||
|
||||
function cht(){
|
||||
selected=`printf "$languages\n$core_utils" | fzf`
|
||||
read query\?"query:"
|
||||
|
||||
if printf $languages | grep -qs $selected; then
|
||||
curl cht.sh/$selected/`echo $query | tr ' ' '+'`
|
||||
else
|
||||
curl cht.sh/$selected~$query
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user