From d443dd128244f00665115c0174dce7d958372f65 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 12:02:09 +0100 Subject: [PATCH 1/9] Add socket command to manual --- doc/manual.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/manual.md b/doc/manual.md index 5451283e..8e95eeb5 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -136,8 +136,8 @@ You can then use `^D` (a key combination of `CTRL` and `D`) to quit the diskless mode and let MOROS run the bootscript `/ini/boot.sh` to login and use the shell. -If no disks were detected or if you prefer not to use them you can mount the -system in memory to use a virtual disk with `memory format` before `install`. +If no disks were detected or if you prefer not to use any you can mount the +system in memory and use a virtual disk with `memory format` before `install`. ## Shell @@ -225,7 +225,7 @@ You can edit a file with the `edit` command that will run the text editor. Use `^W` (a key combination of `CTRL` and `W`) inside the editor to write the content to the file and `^Q` to quit the editor and go back to the shell. -The help command has a subcommand `help edit` to list the editor commands: +The `help` command has a subcommand `help edit` to list the editor commands: > help edit MOROS text editor is a very simple editor inspired by Pico, Nano, and Micro. @@ -333,7 +333,13 @@ with `dhcp`: gw: 10.0.2.2 dns: 10.0.2.3 -A few tools are available like the `http` command: +A few tools are available like the generalist `socket` command that be used to +send and receive TCP packets: + + > socket 10.0.2.2:1234 + Hello, World! + +Or the more specialized `http` command to request a document from a web server: > http moros.cc /test.html From 50fb75aa590bf8ce55355990a72e10f4c7a77eed Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 12:02:22 +0100 Subject: [PATCH 2/9] Update syscall doc --- doc/syscalls.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/syscalls.md b/doc/syscalls.md index deed4d03..1831ba38 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -70,20 +70,38 @@ The system will reboot with `0xcafe` and halt with `0xdead`. pub fn sleep(seconds: f64) ``` -## CONNECT (0xC) +## POLL (0xC) + +```rust +pub fn poll(list: &[(usize, IO)]) -> isize +``` + +## CONNECT (0xD) ```rust pub fn connect(handle, usize, addr: &str, port: u16) -> isize ``` -## LISTEN (0xD) +## LISTEN (0xE) ```rust pub fn listen(handle, usize, port: u16) -> isize ``` -## ACCEPT (0xE) +## ACCEPT (0xF) ```rust pub fn accept(handle, usize, addr: &str) -> isize ``` + +## ALLOC (0x10) + +```rust +pub fn alloc(size: usize, align: usize) -> *mut u8 +``` + +## FREE (0x11) + +```rust +pub fn free(ptr: *mut u8, size: usize, align: usize) +``` From b2e0c951df627217ad08605a876d20a393a59b29 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 12:02:35 +0100 Subject: [PATCH 3/9] Update copyright year in help command --- Makefile | 1 - src/usr/help.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dd3eb63c..1635174c 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,6 @@ image: $(img) cargo bootimage $(cargo-opts) dd conv=notrunc if=$(bin) of=$(img) - qemu-opts = -m $(memory) -drive file=$(img),format=raw \ -audiodev $(audio),id=a0 -machine pcspk-audiodev=a0 \ -netdev user,id=e0,hostfwd=tcp::8080-:80 -device $(nic),netdev=e0 diff --git a/src/usr/help.rs b/src/usr/help.rs index 66ccf1b9..9443edcc 100644 --- a/src/usr/help.rs +++ b/src/usr/help.rs @@ -57,7 +57,7 @@ fn help_summary() -> Result<(), ExitCode> { println!(); println!("{}Credits:{}", csi_color, csi_reset); - println!(" Made with <3 in 2019-2022 by Vincent Ollivier "); + println!(" Made with <3 in 2019-2023 by Vincent Ollivier "); Ok(()) } From cfc11555ed380314824cee7656304a1503b3c989 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 12:02:57 +0100 Subject: [PATCH 4/9] Fix lisp include --- src/usr/install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr/install.rs b/src/usr/install.rs index 6a9bcf23..ebd90470 100644 --- a/src/usr/install.rs +++ b/src/usr/install.rs @@ -65,7 +65,7 @@ pub fn copy_files(verbose: bool) { create_dir("/tmp/lisp", verbose); copy_file("/tmp/lisp/colors.lsp", include_bytes!("../../dsk/tmp/lisp/colors.lsp"), verbose); copy_file("/tmp/lisp/factorial.lsp", include_bytes!("../../dsk/tmp/lisp/factorial.lsp"), verbose); - //copy_file("/tmp/lisp/fetch.lsp", include_bytes!("../../dsk/tmp/lisp/ntp.lsp"), verbose); + //copy_file("/tmp/lisp/fetch.lsp", include_bytes!("../../dsk/tmp/lisp/fetch.lsp"), verbose); copy_file("/tmp/lisp/fibonacci.lsp", include_bytes!("../../dsk/tmp/lisp/fibonacci.lsp"), verbose); copy_file("/tmp/lisp/geotime.lsp", include_bytes!("../../dsk/tmp/lisp/geotime.lsp"), verbose); //copy_file("/tmp/lisp/ntp.lsp", include_bytes!("../../dsk/tmp/lisp/ntp.lsp"), verbose); From fc5a334ea3e9a1c5699bce624bf41d01ea1bd979 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 12:03:15 +0100 Subject: [PATCH 5/9] Fix error styling in shell --- src/usr/shell.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usr/shell.rs b/src/usr/shell.rs index d55185c1..53612484 100644 --- a/src/usr/shell.rs +++ b/src/usr/shell.rs @@ -411,17 +411,17 @@ fn exec_with_config(cmd: &str, config: &mut Config) -> Result<(), ExitCode> { restore_handles = true; if !num.is_empty() { // if let Ok(right_handle) = num.parse() {} - println!("Redirecting to a handle has not been implemented yet"); + error!("Redirecting to a handle has not been implemented yet"); return Err(ExitCode::Failure); } else { if i == n - 1 { - println!("Could not parse path for redirection"); + error!("Could not parse path for redirection"); return Err(ExitCode::Failure); } let path = args[i + 1]; let append_mode = head_count > 1; if api::fs::reopen(path, left_handle, append_mode).is_err() { - println!("Could not open path for redirection"); + error!("Could not open path for redirection"); return Err(ExitCode::Failure); } args.remove(i); // Remove path from args @@ -430,7 +430,7 @@ fn exec_with_config(cmd: &str, config: &mut Config) -> Result<(), ExitCode> { n -= 1; args.remove(i); // Remove redirection from args } else if is_thin_arrow { - println!("Piping has not been implemented yet"); + error!("Piping has not been implemented yet"); return Err(ExitCode::Failure); } } From 38bb3fc58f008d500a390d6edc329be594da8f05 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Sun, 26 Nov 2023 14:22:10 +0100 Subject: [PATCH 6/9] Use uppercase hex --- Makefile | 2 +- doc/syscalls.md | 2 +- dsk/src/bin/halt.s | 6 +++--- run/bochs.rc | 2 +- src/api/syscall.rs | 4 ++-- src/lib.rs | 2 +- src/sys/net/nic/rtl8139.rs | 2 +- src/sys/syscall/service.rs | 4 ++-- www/syscalls.html | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 1635174c..1d98ab36 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ qemu: test: cargo test --release --lib --no-default-features --features serial -- \ - -m $(memory) -display none -serial stdio -device isa-debug-exit,iobase=0xf4,iosize=0x04 + -m $(memory) -display none -serial stdio -device isa-debug-exit,iobase=0xF4,iosize=0x04 website: cd www && sh build.sh diff --git a/doc/syscalls.md b/doc/syscalls.md index 1831ba38..59fa17e1 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -62,7 +62,7 @@ pub fn delete(path: &str) -> isize pub fn stop(code: usize) ``` -The system will reboot with `0xcafe` and halt with `0xdead`. +The system will reboot with `0xCAFE` and halt with `0xDEAD`. ## SLEEP (0xB) diff --git a/dsk/src/bin/halt.s b/dsk/src/bin/halt.s index 2b1d7275..4ad97e76 100644 --- a/dsk/src/bin/halt.s +++ b/dsk/src/bin/halt.s @@ -13,10 +13,10 @@ _start: mov rdx, len ; size of string int 0x80 - mov rax, 0xb ; syscall number for SLEEP + mov rax, 0xB ; syscall number for SLEEP mov rdi, __?float64?__(0.5) ; duration int 0x80 - mov rax, 0xa ; syscall number for STOP - mov rdi, 0xdead ; halt code + mov rax, 0xA ; syscall number for STOP + mov rdi, 0xDEAD ; halt code int 0x80 diff --git a/run/bochs.rc b/run/bochs.rc index 34ae004f..97fa0446 100644 --- a/run/bochs.rc +++ b/run/bochs.rc @@ -1,4 +1,4 @@ megs: 32 -ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 +ata0: enabled=1, ioaddr1=0x1F0, ioaddr2=0x3F0, irq=14 ata0-master: type=disk, path="../disk.img", mode=flat, cylinders=0, heads=0, spt=0 boot: disk diff --git a/src/api/syscall.rs b/src/api/syscall.rs index c37c30cf..4e3fd720 100644 --- a/src/api/syscall.rs +++ b/src/api/syscall.rs @@ -103,11 +103,11 @@ pub fn stop(code: usize) { } pub fn reboot() { - stop(0xcafe); + stop(0xCAFE); } pub fn halt() { - stop(0xdead); + stop(0xDEAD); } pub fn poll(list: &[(usize, IO)]) -> Option<(usize, IO)> { diff --git a/src/lib.rs b/src/lib.rs index 3c26ba5f..92d8a029 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,7 +83,7 @@ pub fn exit_qemu(exit_code: QemuExitCode) { use x86_64::instructions::port::Port; unsafe { - let mut port = Port::new(0xf4); + let mut port = Port::new(0xF4); port.write(exit_code as u32); } } diff --git a/src/sys/net/nic/rtl8139.rs b/src/sys/net/nic/rtl8139.rs index 67354570..92cd4d23 100644 --- a/src/sys/net/nic/rtl8139.rs +++ b/src/sys/net/nic/rtl8139.rs @@ -296,7 +296,7 @@ pub fn interrupt_handler() { printk!("RTL8139 interrupt!\n"); if let Some(mut guard) = sys::net::IFACE.try_lock() { if let Some(ref mut iface) = *guard { - unsafe { iface.device_mut().ports.isr.write(0xffff) } // Clear the interrupt + unsafe { iface.device_mut().ports.isr.write(0xFFFF) } // Clear the interrupt } } } diff --git a/src/sys/syscall/service.rs b/src/sys/syscall/service.rs index 6264c26b..efcc0e5f 100644 --- a/src/sys/syscall/service.rs +++ b/src/sys/syscall/service.rs @@ -114,7 +114,7 @@ pub fn spawn(path: &str, args_ptr: usize, args_len: usize) -> ExitCode { pub fn stop(code: usize) -> usize { match code { - 0xcafe => { // Reboot + 0xCAFE => { // Reboot unsafe { asm!( "xor rax, rax", @@ -122,7 +122,7 @@ pub fn stop(code: usize) -> usize { ); } } - 0xdead => { // Halt + 0xDEAD => { // Halt sys::process::exit(); sys::acpi::shutdown(); } diff --git a/www/syscalls.html b/www/syscalls.html index 1de78399..dca6f020 100644 --- a/www/syscalls.html +++ b/www/syscalls.html @@ -60,7 +60,7 @@

STOP (0xA)

pub fn stop(code: usize)
 
-

The system will reboot with 0xcafe and halt with 0xdead.

+

The system will reboot with 0xCAFE and halt with 0xDEAD.

SLEEP (0xB)

From 047c6fd60bceb224d300f66bde383ce9e65411f7 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Wed, 29 Nov 2023 00:16:59 +0100 Subject: [PATCH 7/9] Update website --- www/build.sh | 3 ++- www/calculator.html | 1 + www/editor.html | 1 + www/filesystem.html | 1 + www/games.html | 9 ++++---- www/hardware.html | 1 + www/index.html | 1 + www/lisp.html | 1 + www/manual.html | 16 ++++++++++---- www/moros.css | 52 ++++++++++++++++++++++++++++++++++++++------- www/network.html | 1 + www/regex.html | 1 + www/shell.html | 1 + www/syscalls.html | 22 ++++++++++++++++--- www/test.html | 1 + 15 files changed, 92 insertions(+), 20 deletions(-) diff --git a/www/build.sh b/www/build.sh index 962202cb..1a1695ba 100644 --- a/www/build.sh +++ b/www/build.sh @@ -2,7 +2,7 @@ set -e mkdir -p images for file in ../doc/images/*.png; do - ln -s "../$file" images/ + ln -fs "../$file" images/ done echo "# MOROS" > ../doc/test.md @@ -23,6 +23,7 @@ for md in ../doc/*.md; do EOF redcarpet --parse fenced-code-blocks ../doc/$md | sed "s/.md/.html/g" | sed "s/^> $html cat << EOF >> $html + EOF diff --git a/www/calculator.html b/www/calculator.html index 411df9b1..e6851a7f 100644 --- a/www/calculator.html +++ b/www/calculator.html @@ -46,5 +46,6 @@

MOROS Calculator

> (2 + 3) * 4 20 + diff --git a/www/editor.html b/www/editor.html index ffb88807..d4ca7de1 100644 --- a/www/editor.html +++ b/www/editor.html @@ -23,5 +23,6 @@

Commands

  • CTRL + y to copy (yank) a line
  • CTRL + p to paste (put) a line
  • + diff --git a/www/filesystem.html b/www/filesystem.html index f28cc712..c15edac9 100644 --- a/www/filesystem.html +++ b/www/filesystem.html @@ -201,5 +201,6 @@

    FileInfo

    n = length of name buffer m = 13 + n + diff --git a/www/games.html b/www/games.html index ed58f055..d332cade 100644 --- a/www/games.html +++ b/www/games.html @@ -8,10 +8,6 @@

    MOROS Games

    -

    2048

    - -

    2048

    -

    Chess

    chess

    @@ -19,5 +15,10 @@

    Chess

    Conway's Game of Life

    life

    + +

    2048

    + +

    2048

    + diff --git a/www/hardware.html b/www/hardware.html index a48b97aa..386757d3 100644 --- a/www/hardware.html +++ b/www/hardware.html @@ -84,5 +84,6 @@

    Laptops

  • [ ] NIC: Intel I219-LM
  • + diff --git a/www/index.html b/www/index.html index 7e13d52e..da2dc7c2 100644 --- a/www/index.html +++ b/www/index.html @@ -73,5 +73,6 @@

    Demo

    $ ssh guest@try.moros.cc
     
    + diff --git a/www/lisp.html b/www/lisp.html index 87b98c94..a3f99ea3 100644 --- a/www/lisp.html +++ b/www/lisp.html @@ -255,5 +255,6 @@

    Unreleased

    • Add hexadecimal number literals
    + diff --git a/www/manual.html b/www/manual.html index 082755f7..4377b69e 100644 --- a/www/manual.html +++ b/www/manual.html @@ -146,8 +146,8 @@

    Installation

    diskless mode and let MOROS run the bootscript /ini/boot.sh to login and use the shell.

    -

    If no disks were detected or if you prefer not to use them you can mount the -system in memory to use a virtual disk with memory format before install.

    +

    If no disks were detected or if you prefer not to use any you can mount the +system in memory and use a virtual disk with memory format before install.

    Shell

    @@ -243,7 +243,7 @@

    Files

    Use ^W (a key combination of CTRL and W) inside the editor to write the content to the file and ^Q to quit the editor and go back to the shell.

    -

    The help command has a subcommand help edit to list the editor commands:

    +

    The help command has a subcommand help edit to list the editor commands:

    > help edit
     MOROS text editor is a very simple editor inspired by Pico, Nano, and Micro.
    @@ -361,7 +361,14 @@ 

    Network

    dns: 10.0.2.3
    -

    A few tools are available like the http command:

    +

    A few tools are available like the generalist socket command that be used to +send and receive TCP packets:

    + +
    > socket 10.0.2.2:1234
    +Hello, World!
    +
    + +

    Or the more specialized http command to request a document from a web server:

    > http moros.cc /test.html
     <!doctype html>
    @@ -376,5 +383,6 @@ 

    Network

    </body> </html>
    + diff --git a/www/moros.css b/www/moros.css index 79ea24f2..2a2b2ac9 100644 --- a/www/moros.css +++ b/www/moros.css @@ -1,22 +1,58 @@ html { display: grid; place-content: center; + + --shadow-color: 49deg 36% 46%; + --img-width: 720px; } body { font-family: sans-serif; - max-width: 720px; + max-width: var(--img-width); margin: 1rem; - color: #111; + background: #FBF1C7; + color: #3C3836; font-size: 18px; } -li code, -p code { - background: #eee; - padding: 0.125rem; +a { + color: #8F3F71; +} +a:hover, a:active { + color: #B17286; +} +li code, p code, pre { + color: #EBDBB2; border-radius: 0.25rem; } +li code, p code { + background: #7C6F64; + padding: 0.125rem; +} pre { - background: #eee; + background: #282828; padding: 1rem; - border-radius: 0.25rem; +} +img { + width: var(--img-width); + margin-left: calc(-16px - 2px); + margin-bottom: 1em; + border: solid 16px #D5C4A1; + border-radius: 16px; + box-shadow: + 0.2px 0.2px 0.4px hsl(var(--shadow-color) / 0.14), + 0.9px 0.9px 1.6px -0.2px hsl(var(--shadow-color) / 0.16), + 1.7px 1.6px 3px -0.4px hsl(var(--shadow-color) / 0.19), + 2.5px 2.5px 4.5px -0.6px hsl(var(--shadow-color) / 0.21), + 3.8px 3.7px 6.8px -0.9px hsl(var(--shadow-color) / 0.23), + 5.6px 5.4px 9.9px -1.1px hsl(var(--shadow-color) / 0.25), + 8.1px 7.9px 14.4px -1.3px hsl(var(--shadow-color) / 0.28), + 11.6px 11.4px 20.7px -1.5px hsl(var(--shadow-color) / 0.3); + outline: solid 2px #28282828; + outline-offset: 1px; + background: #28282878; + padding: 2px; +} + +footer { + margin-top: 2em; + text-align: center; } diff --git a/www/network.html b/www/network.html index 5f72fad0..ca15ae93 100644 --- a/www/network.html +++ b/www/network.html @@ -177,5 +177,6 @@

    SOCKET

    > socket 10.0.2.2:1234 <= /tmp/alice.txt
     
    + diff --git a/www/regex.html b/www/regex.html index a5a69130..6ebddd9b 100644 --- a/www/regex.html +++ b/www/regex.html @@ -29,5 +29,6 @@

    MOROS Regular Expression Engine

    The engine is UTF-8 aware, so for example the unicode character é will be matched by \w even if it's not present in the ASCII table and has a size of two bytes.

    + diff --git a/www/shell.html b/www/shell.html index df8720f1..eef7adf7 100644 --- a/www/shell.html +++ b/www/shell.html @@ -238,5 +238,6 @@

    Tilde Expansion

    The tilde character ~ is a shortcut to $HOME so ~/test will be expanded to $HOME/test by the shell.

    + diff --git a/www/syscalls.html b/www/syscalls.html index dca6f020..dc930564 100644 --- a/www/syscalls.html +++ b/www/syscalls.html @@ -67,19 +67,35 @@

    SLEEP (0xB)

    pub fn sleep(seconds: f64)
     
    -

    CONNECT (0xC)

    +

    POLL (0xC)

    + +
    pub fn poll(list: &[(usize, IO)]) -> isize
    +
    + +

    CONNECT (0xD)

    pub fn connect(handle, usize, addr: &str, port: u16) -> isize
     
    -

    LISTEN (0xD)

    +

    LISTEN (0xE)

    pub fn listen(handle, usize, port: u16) -> isize
     
    -

    ACCEPT (0xE)

    +

    ACCEPT (0xF)

    pub fn accept(handle, usize, addr: &str) -> isize
     
    + +

    ALLOC (0x10)

    + +
    pub fn alloc(size: usize, align: usize) -> *mut u8
    +
    + +

    FREE (0x11)

    + +
    pub fn free(ptr: *mut u8, size: usize, align: usize)
    +
    + diff --git a/www/test.html b/www/test.html index b9a43c8e..32f13db2 100644 --- a/www/test.html +++ b/www/test.html @@ -7,5 +7,6 @@

    MOROS

    + From dcce3b52ea4ecf0ce328e594ebcb6c1f684d8a10 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Wed, 29 Nov 2023 09:52:40 +0100 Subject: [PATCH 8/9] Move some CSI color positions --- src/usr/beep.rs | 4 ++-- src/usr/disk.rs | 2 +- src/usr/find.rs | 4 ++-- src/usr/httpd.rs | 6 +++--- src/usr/life.rs | 8 ++++---- src/usr/list.rs | 8 ++++---- src/usr/memory.rs | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/usr/beep.rs b/src/usr/beep.rs index 6955e440..fe1c7d79 100644 --- a/src/usr/beep.rs +++ b/src/usr/beep.rs @@ -86,7 +86,7 @@ fn help() -> Result<(), ExitCode> { println!("{}Usage:{} beep {}{1}", csi_title, csi_reset, csi_option); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-f{1},{0} --freq {1} Tone frequency", csi_option, csi_reset); - println!(" {0}-l{1},{0} --len {1} Tone length", csi_option, csi_reset); + println!(" {0}-f{1}, {0}--freq {1} Tone frequency", csi_option, csi_reset); + println!(" {0}-l{1}, {0}--len {1} Tone length", csi_option, csi_reset); Ok(()) } diff --git a/src/usr/disk.rs b/src/usr/disk.rs index 80eb9997..25810ff9 100644 --- a/src/usr/disk.rs +++ b/src/usr/disk.rs @@ -146,7 +146,7 @@ fn help_usage() { println!("{}Usage:{} disk usage {}{}", csi_title, csi_reset, csi_option, csi_reset); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-b{1},{0} --binary-size{1} Use binary size", csi_option, csi_reset); + println!(" {0}-b{1}, {0}--binary-size{1} Use binary size", csi_option, csi_reset); } fn help() { diff --git a/src/usr/find.rs b/src/usr/find.rs index b27e28b5..dfb63550 100644 --- a/src/usr/find.rs +++ b/src/usr/find.rs @@ -161,6 +161,6 @@ fn usage() { println!("{}Usage:{} find {} {1}", csi_title, csi_reset, csi_option); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-n{1},{0} --name \"\"{1} Find file name matching {0}{1}", csi_option, csi_reset); - println!(" {0}-l{1},{0} --line \"\"{1} Find lines matching {0}{1}", csi_option, csi_reset); + println!(" {0}-n{1}, {0}--name \"\"{1} Find file name matching {0}{1}", csi_option, csi_reset); + println!(" {0}-l{1}, {0}--line \"\"{1} Find lines matching {0}{1}", csi_option, csi_reset); } diff --git a/src/usr/httpd.rs b/src/usr/httpd.rs index ce62809e..d4a86095 100644 --- a/src/usr/httpd.rs +++ b/src/usr/httpd.rs @@ -401,7 +401,7 @@ fn usage() { println!("{}Usage:{} httpd {}{1}", csi_title, csi_reset, csi_option); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-d{1},{0} --dir {1} Set directory to {0}{1}", csi_option, csi_reset); - println!(" {0}-p{1},{0} --port {1} Listen to port {0}{1}", csi_option, csi_reset); - println!(" {0}-r{1},{0} --read-only{1} Set read-only mode", csi_option, csi_reset); + println!(" {0}-d{1}, {0}--dir {1} Set directory to {0}{1}", csi_option, csi_reset); + println!(" {0}-p{1}, {0}--port {1} Listen to port {0}{1}", csi_option, csi_reset); + println!(" {0}-r{1}, {0}--read-only{1} Set read-only mode", csi_option, csi_reset); } diff --git a/src/usr/life.rs b/src/usr/life.rs index 1f5110e2..f97c1cc1 100644 --- a/src/usr/life.rs +++ b/src/usr/life.rs @@ -232,8 +232,8 @@ fn usage() { println!("{}Usage:{} life {} []{1}", csi_title, csi_reset, csi_option); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-p{1},{0} --population {1} Set the seed population to {0}{1}", csi_option, csi_reset); - println!(" {0}-i{1},{0} --interval {1} Set the seed interval to {0}{1}", csi_option, csi_reset); - println!(" {0}-s{1},{0} --speed {1} Set the simulation speed to {0}{1}", csi_option, csi_reset); - println!(" {0}-q{1},{0} --quiet{1} Enable quiet mode", csi_option, csi_reset); + println!(" {0}-p{1}, {0}--population {1} Set the seed population to {0}{1}", csi_option, csi_reset); + println!(" {0}-i{1}, {0}--interval {1} Set the seed interval to {0}{1}", csi_option, csi_reset); + println!(" {0}-s{1}, {0}--speed {1} Set the simulation speed to {0}{1}", csi_option, csi_reset); + println!(" {0}-q{1}, {0}--quiet{1} Enable quiet mode", csi_option, csi_reset); } diff --git a/src/usr/list.rs b/src/usr/list.rs index 48e24ac7..63dd8d4f 100644 --- a/src/usr/list.rs +++ b/src/usr/list.rs @@ -101,9 +101,9 @@ fn help() -> Result<(), ExitCode> { println!("{}Usage:{} list {} []{}", csi_title, csi_reset, csi_option, csi_reset); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-a{1},{0} --all{1} Show dot files", csi_option, csi_reset); - println!(" {0}-n{1},{0} --name{1} Sort by name", csi_option, csi_reset); - println!(" {0}-s{1},{0} --size{1} Sort by size", csi_option, csi_reset); - println!(" {0}-t{1},{0} --time{1} Sort by time", csi_option, csi_reset); + println!(" {0}-a{1}, {0}--all{1} Show dot files", csi_option, csi_reset); + println!(" {0}-n{1}, {0}--name{1} Sort by name", csi_option, csi_reset); + println!(" {0}-s{1}, {0}--size{1} Sort by size", csi_option, csi_reset); + println!(" {0}-t{1}, {0}--time{1} Sort by time", csi_option, csi_reset); Ok(()) } diff --git a/src/usr/memory.rs b/src/usr/memory.rs index 271511e5..d3fcc5ee 100644 --- a/src/usr/memory.rs +++ b/src/usr/memory.rs @@ -67,7 +67,7 @@ fn help_usage() { println!("{}Usage:{} memory usage {}{}", csi_title, csi_reset, csi_option, csi_reset); println!(); println!("{}Options:{}", csi_title, csi_reset); - println!(" {0}-b{1},{0} --binary-size{1} Use binary size", csi_option, csi_reset); + println!(" {0}-b{1}, {0}--binary-size{1} Use binary size", csi_option, csi_reset); } fn help() { From b7930ce9d3d1fc3415309f3aaca1aa263f292b32 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Thu, 30 Nov 2023 17:42:22 +0100 Subject: [PATCH 9/9] Update line-height --- www/moros.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/moros.css b/www/moros.css index 2a2b2ac9..0447ff42 100644 --- a/www/moros.css +++ b/www/moros.css @@ -1,3 +1,6 @@ +:where(pre) { + all: revert; +} html { display: grid; place-content: center; @@ -12,6 +15,7 @@ body { background: #FBF1C7; color: #3C3836; font-size: 18px; + line-height: 1.5; } a { color: #8F3F71; @@ -30,6 +34,7 @@ li code, p code { pre { background: #282828; padding: 1rem; + line-height: 1.1; } img { width: var(--img-width);