342 字
2 分钟
luna shell之死
why not lua-shell
显而易见的,lua作为shell还是太繁琐了,但是这其实不是重点,重点在于
wow fiiiiiish
gosh, why not fish!
他妈的关键字几乎是一样的!哪来的孪生姐妹!
if test $n -eq 1 echo "one"else if test $n -eq 2 echo "two"else echo "many"end
while test $i -lt 3 echo $i set i (math $i + 1)end
for f in *.txt echo "Processing $f" if string match -q "skip*" $f break endendif n == 1 then print("one")elseif n == 2 then print("two")else print("many")end
while i < 3 do print(i) i = i + 1end
for _, f in ipairs(files) do print("Processing " .. f) if f:match("^skip") then break endend差别在哪我怎么看不到这不两段一样的代码吗
你是说,有一个功能强大、语法优雅、社区成熟、生态丰富的shell,她满足了我的既要又要还要???
我草我真的睡醒了吗,都给我去用fish
为什么像啊
据说是二者都出生在一个时代(我就说是孪生姐妹吧),然后彼时彼刻,一股推翻老一代留下的技术债的风潮正在掀起
lua推翻了c,fish推翻了bash
当然其实并没有真的推翻了,但是确实是反其道而行之,抛弃其固有范式
好吧其实我查了一下我记错了,她俩差了十二年出生,不过精神内核都是一致的
luna shell之死
https://blog.monblog.top/posts/lunash-end/