chiark / gitweb /
07a: store paths in the normal order (root to leaf)
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 7 May 2024 18:24:54 +0000 (19:24 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 7 May 2024 18:24:54 +0000 (19:24 +0100)
07/07a.bqn

index a22a0e41aa811bd2b66f272489819b3a5922817a..0cd6fc8d54299fa7d5c0f3ff13f58d9f90e00154 100644 (file)
@@ -14,9 +14,9 @@ FS←{𝕤
   nothing←⟨0,2⟩⥊⟨⟩ # 0 by 23 array, to return from "cd"
   Exec⇐{
     ⟨⟩𝕊⟨"cd", "/"⟩:  cwd↩⟨⟩,       nothing;
-    ⟨⟩𝕊⟨"cd", ".."⟩: cwd 1⊸↓↩,     nothing;
-    â\9f¨â\9f©ð\9d\95\8aâ\9f¨"cd", dirâ\9f©:  cwd â\9f¨dirâ\9f©â\8a¸â\88¾↩, nothing;
-    input𝕊⟨"ls"⟩: >{𝕊⟨size,name⟩:⟨size,⟨name⟩∾cwd⟩}∘{(' '=𝕩)Split𝕩}¨input
+    ⟨⟩𝕊⟨"cd", ".."⟩: cwd ¯1⊸↓↩,    nothing;
+    â\9f¨â\9f©ð\9d\95\8aâ\9f¨"cd", dirâ\9f©:  cwd â\88¾â\9f\9câ\9f¨dirâ\9f©↩, nothing;
+    input𝕊⟨"ls"⟩: >{𝕊⟨size,name⟩:⟨size,cwd∾⟨name⟩⟩}∘{(' '=𝕩)Split𝕩}¨input
   }
   Cmd⇐{𝕨 Exec 1↓(' '=𝕩)Split𝕩}
 }