shithub: docs.9front.org

Download patch

ref: 8a4032458b3cbef3faa8f4d7cd26fa073b8b06e1
parent: 1bdfabb9cfb3b0f1c60975ade62c41a547c958d6
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Aug 4 04:52:33 EDT 2020

add a few rio tips and tricks

--- a/howto.md
+++ b/howto.md
@@ -8,3 +8,5 @@
 [Running drawterm on Android](android-drawterm.html)
 
 [Building a kernel-only 9front ISO](kernel-iso.html)
+
+[Rio tips and tricks](rio-tips-and-tricks.html)
--- /dev/null
+++ b/rio-tips-and-tricks.md
@@ -1,0 +1,37 @@
+Rio tips and tricks
+===================
+
+Filename completion is available with CTRL+F.
+
+Command `"` prints the last used command.
+`""` _executes_ the last command.
+Both accept an optional argument to match a command string, ie:
+
+	term% touch /tmp/1
+	term% lc /tmp
+	1
+	term% "
+		term% lc /tmp
+	term% ""
+		term% lc /tmp
+	1
+	term% "" to
+		term% touch /tmp/1
+	term% "" l
+		term% lc /tmp
+	1
+
+If there is a command you want to run repeatedly, it's easy to define a rc function and use it instead:
+
+	fn t { mk && ./6.out some arguments here >log && grep something log }
+	t
+
+To change the function without having to search it in the window, run `whatis t`, then redefined it.
+`ls /env/fn*` will show which functions are defined.
+
+To clear the window from any text run `echo >/dev/text`.
+
+If you need to snarf an output of some command, instead of outputting into the window and then using mouse,
+consider doing it directly instead: `command arg arg >/dev/snarf`.
+
+Want to do advanced searching on window's text? Run your favorite text editor on it: `sam /dev/text`.