From fe8dd9201a04ad42d2baa825630cd9cc6921bc4e Mon Sep 17 00:00:00 2001 From: merces Date: Fri, 14 Aug 2026 02:36:53 -0300 Subject: [PATCH 1/5] feat: comments support in initfile --- README.md | 2 +- src/initfile.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18102d6..05954b9 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Once you load a file in **dz6**, you can use the commands below. | `wq` or `x` | Write changes to file and quit | | | | `q` | Quit without saving changes | | In replace mode, `T` (truncate) is an exception because it modifies the file immediately. | -If you need permanent settings, create a `$HOME/.dz6init` file containing any of the commands above, one per line. dz6 will load that at startup. +> If you need permanent settings, create a `$HOME/.dz6init` file containing any of the commands above, one per line. dz6 will load that at startup. Lines starting with `#` are ignored. ### Hex view diff --git a/src/initfile.rs b/src/initfile.rs index bfe59a8..1ef3dd6 100644 --- a/src/initfile.rs +++ b/src/initfile.rs @@ -13,7 +13,7 @@ impl App { let path = home.join(".dz6init"); let data = fs::read_to_string(path)?; - for cmdline in data.lines() { + for cmdline in data.lines().filter(|line| !line.starts_with('#')) { parse_command(self, cmdline); } } From bf5f4efd08016ebad6045834be2b5ae1d69aa42b Mon Sep 17 00:00:00 2001 From: merces Date: Fri, 14 Aug 2026 02:59:55 -0300 Subject: [PATCH 2/5] udpate changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f949a11..4fcc239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Header view: new view to inspect ELF and PE executables. - Added a command to change the view (same as pressing `Tab`). Example: `:set view hex` (possible values are `text`, `hex`, and `header`). It can be used in `~/.dz6init` to set the default view when dz6 is loaded. +- Added support for comments / lines starting with `#` in `~/.dz6init`. - `Tab` cycles through available views now (`Enter` no longer does that). - To search over the string list, press `/` (it was `f` before). From 2400609821a56e3df196b9b6b78634bd7dece627 Mon Sep 17 00:00:00 2001 From: merces Date: Fri, 14 Aug 2026 03:28:01 -0300 Subject: [PATCH 3/5] trim() lines before passing them to filter --- src/initfile.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/initfile.rs b/src/initfile.rs index 1ef3dd6..5c44362 100644 --- a/src/initfile.rs +++ b/src/initfile.rs @@ -13,7 +13,11 @@ impl App { let path = home.join(".dz6init"); let data = fs::read_to_string(path)?; - for cmdline in data.lines().filter(|line| !line.starts_with('#')) { + for cmdline in data + .lines() + .map(|line| line.trim()) + .filter(|line| !line.starts_with('#')) + { parse_command(self, cmdline); } } From 1e9db8ae2c5926bca959b2298b1f172f5fbf19d4 Mon Sep 17 00:00:00 2001 From: merces Date: Fri, 14 Aug 2026 15:40:48 -0300 Subject: [PATCH 4/5] docs: merge changelog from main branch --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fcc239..46b6306 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,15 @@ - Header view: new view to inspect ELF and PE executables. - Added a command to change the view (same as pressing `Tab`). Example: `:set view hex` (possible values are `text`, `hex`, and `header`). It can be used in `~/.dz6init` to set the default view when dz6 is loaded. - Added support for comments / lines starting with `#` in `~/.dz6init`. + +## Breaking changes: - `Tab` cycles through available views now (`Enter` no longer does that). - To search over the string list, press `/` (it was `f` before). +## dz6 v0.7.1 + +- Update mmap-io (fix build issue due to mmap-io update). + ## dz6 v0.7.0 - Hex view: From f7c282bf4743e377fd601d7f095d565a119e9f97 Mon Sep 17 00:00:00 2001 From: merces Date: Sat, 15 Aug 2026 13:04:03 -0300 Subject: [PATCH 5/5] use str::trim with map --- src/initfile.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initfile.rs b/src/initfile.rs index 5c44362..94673d5 100644 --- a/src/initfile.rs +++ b/src/initfile.rs @@ -15,7 +15,7 @@ impl App { for cmdline in data .lines() - .map(|line| line.trim()) + .map(str::trim) .filter(|line| !line.starts_with('#')) { parse_command(self, cmdline);