elvish_config/aliases/grawlix.elv

18 lines
404 B
Plaintext
Raw Normal View History

2022-10-04 05:26:02 +00:00
use str
edit:add-var grawlix~ {|@argv|
var @chars = (str:split '' '#$%&*+=^~£§¶±÷≠Ω√∆◊')
var nbChars = (count $chars)
var length = (shuf -i 4-7 -n 1)
var graw = []
range $length | each {|_|
var ci = (shuf -i 1-$nbChars -n 1)
set @graw = $@graw $chars[(- $ci 1)]
}
set @graw = $@graw '!'
echo (str:join '' $graw)
}