elvish_config/aliases/sendsms.elv

12 lines
314 B
Plaintext

edit:add-var sendsms~ [@argv]{
use str
local:api = https://smsapi.free-mobile.fr/sendmsg
local:param = (cat $E:HOME/.config/elvish/private/freesms.json | from-json)
local:msg = (str:join '%20' $argv)
local:url = $api'?user='$param[user]'&pass='$param[password]'&msg='$msg
#put $url
curl $url
}