From ff7218cac886979ebfd5ace8477ff88cbffca7d0 Mon Sep 17 00:00:00 2001 From: Benjamin VAUDOUR Date: Tue, 4 Oct 2022 07:26:02 +0200 Subject: [PATCH] =?UTF-8?q?Avec=20git=20add=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aliases/grawlix.elv | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 aliases/grawlix.elv diff --git a/aliases/grawlix.elv b/aliases/grawlix.elv new file mode 100644 index 0000000..443bdf2 --- /dev/null +++ b/aliases/grawlix.elv @@ -0,0 +1,17 @@ +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) +}