elvish_config/aliases/sendsms.elv

12 lines
325 B
Plaintext
Raw Normal View History

2021-12-11 21:09:02 +00:00
edit:add-var sendsms~ {|@argv|
2021-08-24 18:45:25 +00:00
use str
var api = https://smsapi.free-mobile.fr/sendmsg
var param = (cat $E:HOME/.config/elvish/private/freesms.json | from-json)
var msg = (str:join '%20' $argv)
2021-08-24 18:45:25 +00:00
var url = (printf '%s?user=%s&pass=%s&msg=%s' $api $param[user] $param[password] $msg)
2021-08-24 18:45:25 +00:00
#put $url
e:curl $url
2021-08-24 18:45:25 +00:00
}