zeza 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zeza-1.7.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lionel B. Dyck
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
zeza-1.7.0/PKG-INFO ADDED
@@ -0,0 +1,285 @@
1
+ Metadata-Version: 2.4
2
+ Name: zeza
3
+ Version: 1.7.0
4
+ Summary: Modern eza-inspired file listing utility for IBM z/OS USS
5
+ Author-email: "Lionel B. Dyck" <lbdyck@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/lbdyck/zeza
8
+ Project-URL: Repository, https://github.com/lbdyck/zeza
9
+ Project-URL: Issues, https://github.com/lbdyck/zeza/issues
10
+ Keywords: eza,files,mainframe,terminal,tui,uss,zos
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Operating System :: POSIX
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: System :: Filesystems
23
+ Classifier: Topic :: System :: Shells
24
+ Classifier: Topic :: Utilities
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Dynamic: license-file
29
+
30
+ # zeza
31
+
32
+ **A feature-rich Python clone of the `eza` (modern ls) utility specifically tailored for IBM z/OS UNIX System Services (USS).**
33
+
34
+ The command, repository, and default script are named `zeza`.
35
+
36
+ ## Description
37
+
38
+ `zeza` provides robust colorized terminal output, native EBCDIC/ASCII tag support (`chtag`), extended attribute inspection (`extattr`), zFS dataset resolution, and Git status integration.
39
+
40
+ It features both a standard CLI format and an interactive full-screen Text User Interface (TUI) for navigating, sorting, filtering, customizing columns, inspecting, editing, modifying z/OS attributes (`chtag`, `extattr`, `chmod`), and managing files directly on the mainframe.
41
+
42
+ ## Sample Output
43
+
44
+ Running `zeza.py -laTgD` inside a z/OS USS Git repository (note how `-D` only prints the dataset on the first entry or when a file/directory crosses into a different zFS dataset):
45
+
46
+ ```text
47
+ . [ZOWE.ZFS.USERS] on  main:
48
+ Permissions Ln User Group Size Modified Git Tag Info Name [Dataset]
49
+ drwxr-xr-x 39 LBDYCK ZOWEDEV 8.0K Nov 16 16:00 -- .. [ZOWE.ZFS.USERS]
50
+ drwxr-xr-x 7 LBDYCK ZOWEDEV 8.0K Nov 17 08:15 -- .git
51
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 1.0K Nov 16 16:00 -- t UTF-8 LICENSE
52
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 7.4K Nov 18 13:15 M t ISO8859-1 README.md
53
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 6.1K Nov 18 13:15 -- t ISO8859-1 zeza.1
54
+ -rwxr-xr-x 1 LBDYCK ZOWEDEV 64.8K Nov 18 13:15 -- t ISO8859-1 zeza.py
55
+ ```
56
+
57
+ ## Prerequisites
58
+
59
+ * **Base z/OS USS Utilities:** Uses standard built-in z/OS commands (`ls`, `df`, `extattr`, `chtag`, `getfacl`) for metadata, file tagging, ACLs, and zFS mount resolution.
60
+ * **Python 3:** Requires `python3` (such as IBM Open Enterprise SDK for Python or the [zopen community](https://zopen.community/) Python port).
61
+ * **Optional Dependencies:**
62
+ * `git` (via zopen community or Rocket) for `-g` / `--git` repository status and branch display.
63
+ * `zotman` / `man-db` (via zopen community) for viewing and indexing the `ISO8859-1` `zeza.1` manpage natively.
64
+ * A [Nerd Font](https://www.nerdfonts.com/) installed on your local terminal emulator (e.g., Windows Terminal, iTerm2, WezTerm) if using `-i` / `--icons`.
65
+
66
+ ## Installation
67
+
68
+ Install the published package from PyPI:
69
+
70
+ ```bash
71
+ python3 -m pip install zeza
72
+ ```
73
+
74
+ The `zeza` command is provided by the package:
75
+
76
+ ```bash
77
+ zeza --help
78
+ zeza --version
79
+ zeza --tui
80
+ ```
81
+
82
+ To install from a source checkout:
83
+
84
+ ```bash
85
+ python3 -m pip install .
86
+ ```
87
+
88
+ To install directly without pip:
89
+
90
+ ```bash
91
+ python3 install.py --prefix /usr/local
92
+ ```
93
+
94
+ The installer copies the executable to `bin/zeza` and the manpage to
95
+ `share/man/man1/zeza.1` under the prefix. The prefix must be absolute; it
96
+ defaults to `$PREFIX` or `/usr/local`. Installed files are tagged as
97
+ ISO8859-1 when `chtag` is available.
98
+
99
+ ## Usage & Recommended Aliases
100
+
101
+ You can run the installed command or the utility directly from a source checkout:
102
+
103
+ ```bash
104
+ zeza [OPTIONS] [PATHS...]
105
+ python3 zeza.py [OPTIONS] [PATHS...]
106
+ ```
107
+
108
+ For daily use, add `zeza.py` to your `PATH` (or symlink it) and add these convenient shortcuts to your `~/.bashrc` or `~/.zshrc`:
109
+
110
+ ```bash
111
+ # Base command aliases
112
+ alias zeza='/path/to/zeza/zeza.py'
113
+
114
+ # Common workflow shortcuts
115
+ alias ll='zeza -l --group-directories-first' # Long listing with dirs first
116
+ alias la='zeza -la' # Long listing including hidden files
117
+ alias lt='zeza -laT' # Long listing with z/OS file tags
118
+ alias lg='zeza -laTg' # Long listing with file tags and Git status
119
+ alias lzd='zeza -lD' # Show underlying zFS datasets when they change
120
+ alias lx='zeza -lx' # Show z/OS extended attributes (APF, ProgCtl)
121
+ alias ltree='zeza --tree -L 2' # Recursive tree view (2 levels deep)
122
+ alias ztui='zeza --tui' # Launch interactive full-screen TUI
123
+ ```
124
+
125
+ ## Manpage Installation (`zotman` / `man-db`)
126
+
127
+ The included `zeza.1` manpage is maintained in ASCII (`ISO8859-1`) and is designed to work seamlessly with `zotman` (`man-db`) from the [zopen community](https://zopen.community/) project. The direct installer places it in the prefix's `share/man/man1` directory and tags it as ISO8859-1 when `chtag` is available.
128
+
129
+ To preview the manpage directly from the repository directory:
130
+
131
+ ```bash
132
+ zotman ./zeza.1
133
+ ```
134
+
135
+ After installation, run `mandb` from your environment to index the page so
136
+ `man` and `apropos` can locate it:
137
+
138
+ ```bash
139
+ man zeza
140
+ ```
141
+
142
+ Or use `zotman zeza` from the zopen environment.
143
+
144
+ ## CLI Options
145
+
146
+ | Flag | Description |
147
+ | :--- | :--- |
148
+ | `paths` | Files or directories to list (default: current directory). |
149
+ | `-a`, `--all` | Show hidden files (starting with `.`). |
150
+ | `-l`, `--long` | Display extended metadata (perms, links, owner, group, size, time). |
151
+ | `-g`, `--git` | Show Git status badges and the current branch. |
152
+ | `-t`, `--time` | Sort by modification time (newest first). |
153
+ | `-u`, `--access` | Sort/display by last access time (atime). |
154
+ | `-c`, `--ctime` | Sort/display by status change time (ctime). |
155
+ | `-i`, `--icons` | Display Nerd Font icons next to filenames. |
156
+ | `--inode` | Display the file serial number (inode). |
157
+ | `-O`, `--octal` | Display file permissions in octal format. |
158
+ | `-n`, `--numeric` | List numeric UIDs and GIDs instead of names. |
159
+ | `-b`, `--blocks` | Display file sizes in 512-byte blocks instead of bytes. |
160
+ | `-J`, `--json FILE` | Export directory listing data to a specified JSON file. |
161
+ | `-e`, `--ext EXT` | Filter by comma-separated file extensions (e.g., txt,rex,c). |
162
+ | `-R`, `--regex PATTERN` | Filter files matching a regular expression. |
163
+ | `-T`, `--tags` | Display z/OS file tags (state, codeset). |
164
+ | `-x`, `--extattr` | Display z/OS extended attributes (APF, program control, etc.). |
165
+ | `--tree` | Display output in a recursive tree topology. |
166
+ | `-L`, `--level DEPTH` | Limit the recursion depth of the `--tree` display. |
167
+ | `--group-directories-first` | List directories before regular files across any sort order. |
168
+ | `-d`, `--directory` | List directories themselves, not their contents. |
169
+ | `-S`, `--sort-size` | Sort files by size (largest first). |
170
+ | `-r`, `--reverse` | Reverse the current sort order. |
171
+ | `-1`, `--oneline` | Display one entry per line. |
172
+ | `-D`, `--dsn` | Show underlying zFS dataset names (displayed on the first entry and whenever the dataset changes). |
173
+ | `--color WHEN` | When to use terminal colors: `auto`, `always`, `never` (default: `auto`). |
174
+ | `--no-color` | Disable all terminal colors (alias for `--color=never`). Also respects the `NO_COLOR` environment variable. |
175
+ | `--tui` | Launch the interactive fullscreen Text User Interface. |
176
+ | `-v`, `--version` | Show program's version number and exit. |
177
+ | `-h`, `--help` | Show the CLI help message and exit. |
178
+
179
+ ## TUI Hotkeys (Single-Column Reference)
180
+
181
+ * **`UP / DOWN`** : Navigate cursor up or down line by line
182
+ * **`PgUp / PgDn`** : Scroll the directory listing or file viewer by page
183
+ * **`Home / End`** : Jump to the first or last entry in the directory or file viewer
184
+ * **`ENTER`** : Open directory or view file in the built-in pager (supports live ASCII, EBCDIC `IBM-1047`, and Hex dump modes)
185
+ * **`ESC`** : Go up one directory or close active modal/view (25ms fast response)
186
+ * **`.`** : Toggle display of hidden dotfiles (`-a`)
187
+ * **`d`** : Toggle grouping directories before regular files (`[Dirs1st]`)
188
+ * **`i`** : Inspect full file metadata (permissions, ACLs, `chtag`, `extattr`, zFS dataset/mount, timestamps, and Git status)
189
+ * **`e`** : Edit selected file in configured editor (`$EDITOR` or `vi`)
190
+ * **`m`** : Create a new directory (`mkdir` popup dialog)
191
+ * **`A`** : Create a new empty file (popup dialog)
192
+ * **`p`** : Change file permissions (`chmod` octal popup dialog)
193
+ * **`u`** : Change z/OS file tag (`chtag` popup menu for `ISO8859-1`, `IBM-1047`, `UTF-8`, custom codeset, binary, mixed, or untagged)
194
+ * **`x`** : Modify z/OS extended attributes (`extattr` checklist popup for `+a`/`-a`, `+p`/`-p`, `+s`/`-s`, `+l`/`-l`)
195
+ * **`C`** : Copy selected file or directory (opens centered popup input modal)
196
+ * **`R`** : Rename selected file or directory (opens centered popup input modal)
197
+ * **`D`** : Delete selected file or directory (opens centered confirmation popup modal)
198
+ * **`s`** : Sort by file size (largest first)
199
+ * **`t`** : Sort by modification time (`mtime`)
200
+ * **`a`** : Sort by last access time (`atime`)
201
+ * **`z`** : Sort by status change time (`ctime`)
202
+ * **`n`** : Sort by filename
203
+ * **`r`** : Reverse current sort order
204
+ * **`f`** or **`/`** : Filter files in the current directory by substring
205
+ * **`c`** : Clear active filter (or cycle `AUTO` -> `ISO8859-1` -> `IBM-1047` -> `HEX` inside the File Viewer)
206
+ * **`h`** : Toggle side-by-side Hex / ASCII / EBCDIC (`IBM-1047`) dump inside the File Viewer
207
+ * **`v`** : Open interactive **TUI Columns Menu** to add or remove any column (`SPACE`/`ENTER` or shortcut key to toggle, `a` for all, `d` for default, and `s` to save when `Save Columns` is enabled in `o` Settings)
208
+ * **`I`** : Toggle Inode column visibility
209
+ * **`O`** : Toggle Octal permissions column
210
+ * **`N`** : Toggle Numeric UID and GID display
211
+ * **`G`** : Toggle Git status column
212
+ * **`T`** : Toggle z/OS File Tags (`chtag`) column
213
+ * **`X`** : Toggle z/OS Extended Attributes (`[apsl]`) column
214
+ * **`M`** : Toggle zFS Dataset column
215
+ * **`B`** : Toggle 512-byte Blocks size display
216
+ * **`W`** : Toggle Nerd Font Icons display
217
+ * **`o`** : Open colorized Settings menu (configure default editor, toggle `Save Columns` ON/OFF, and preview/save colors)
218
+ * **`F1`** : Show colorized Help tutorial
219
+ * **`q`** : Quit current view or exit TUI
220
+
221
+ ## Configuration & Environment Variables
222
+
223
+ When you save settings inside the TUI (by pressing `o` then `s`), preferences are stored in `~/.pyeza.json` and confirmed via a popup message. By default, `"save_columns"` is set to `false` (`< OFF >`), meaning column changes in the `v` Columns Menu apply only to the current TUI session. If you toggle `Save Columns` to `< ON >` in the `o` Settings menu, pressing `s` inside the `v` Columns Menu will persist your active column layout to `~/.pyeza.json`:
224
+
225
+ ```json
226
+ {
227
+ "editor": "vim",
228
+ "save_columns": false,
229
+ "color_dir": 4,
230
+ "color_exe": 2,
231
+ "color_sym": 6,
232
+ "color_def": 7
233
+ }
234
+ ```
235
+
236
+ *(Color codes follow standard curses/ANSI indices: `0`=Black, `1`=Red, `2`=Green, `3`=Yellow, `4`=Blue, `5`=Magenta, `6`=Cyan, `7`=White).*
237
+
238
+ **Environment Variables:**
239
+
240
+ * `EDITOR`: Default text editor for the TUI `e` hotkey if not overridden in `~/.pyeza.json` (defaults to `vi`).
241
+ * `LS_COLORS`: Standard UNIX color definitions (`di`, `ex`, `ln`, `fi`) are automatically respected in CLI output.
242
+ * `NO_COLOR`: If set in your environment, disables ANSI colors by default (per [no-color.org](https://no-color.org/)).
243
+
244
+ ## z/OS USS Encoding & Polyglot Header Note
245
+
246
+ On z/OS USS, ASCII tools like zopen `vim` and `git` expect source files to be encoded and tagged as `ISO8859-1` or `UTF-8`, whereas the z/OS kernel requires `IBM-1047` (EBCDIC) to parse `#!` shebang lines during direct execution.
247
+
248
+ To allow `zeza.py` to remain in `ISO8859-1` (so you can edit it cleanly in `vim`) while still executing directly from your shell (`./zeza.py`), line 2 of the script uses a POSIX shell/Python polyglot header:
249
+
250
+ ```python
251
+ #!/usr/bin/env python3
252
+ "exec" "python3" "$0" "$@"
253
+ ```
254
+
255
+ If you clone or transfer `zeza.py` to a new z/OS system, ensure its file tag and execute permissions are set properly:
256
+
257
+ ```bash
258
+ chtag -tc ISO8859-1 zeza.py zeza.1 README.md
259
+ chmod 755 zeza.py
260
+ ```
261
+
262
+ ## Change History
263
+
264
+ * **2026-11-18**: Added `Save Columns` option (`save_columns`, default: `OFF`) in the `o` Settings menu to optionally enable `s: Save` in the `v` Columns Menu; fixed line 2 background bleed in TUI popups using `curses.ACS_HLINE`; added interactive TUI modals for `chtag` (`u`), `chmod` (`p`), `extattr` (`x`), `mkdir` (`m`), and new file creation (`A`); added live `ISO8859-1`/`IBM-1047`/Hex dump switching (`c`, `h`) in the TUI file viewer; added `PgUp`/`PgDn`/`Home`/`End`, `.` dotfile toggle, and `d` group-directories-first in TUI; added CLI `--group-directories-first` and `-L`/`--level` tree depth options (v1.7.0).
265
+ * **2026-11-18**: Fixed `C` Copy hotkey collision in TUI (moved `ctime` sort to `z`), reduced `ESC` key delay to 25ms for instant response, added popup confirmation when saving TUI Settings and after Copy/Rename/Delete, updated `-D` to display the zFS dataset only when it changes, and formatted TUI hotkeys in a single-column layout across code, README, and manpage (v1.6.0).
266
+ * **2026-11-18**: Added interactive TUI Columns Menu (`v`) and direct hotkeys (`G`, `T`, `X`, `M`, `B`, `W`, `I`, `O`, `N`) to dynamically add or remove any display column, plus colorized the TUI Settings menu (`o`) with live color previews (v1.5.0).
267
+ * **2026-11-18**: Colorized TUI `F1` help tutorials and added centered, bordered popup modal dialogs for Copy (`C`), Rename (`R`), and Delete (`D`) operations (v1.4.0).
268
+ * **2026-11-17**: Added `zeza.1` manpage documentation with `zotman` (`man-db`) installation and `mandb` indexing instructions.
269
+ * **2026-11-17**: Added `i` hotkey in TUI to display a scrollable full-screen inspector with complete file metadata, ACLs, `chtag` info, `extattr` flags, zFS dataset/mount point, timestamps, and Git status (v1.3.0).
270
+ * **2026-11-17**: Added `-v` / `--version` flag and descriptive `--help` strings for all CLI options.
271
+ * **2026-11-17**: Added `--color` (`auto`, `always`, `never`), `--no-color`, and `NO_COLOR` environment variable support.
272
+ * **2026-11-16**: Added polyglot shell/Python `exec` header for direct execution while maintaining ASCII `vim` compatibility.
273
+ * **2026-11-16**: Streamlined documentation to focus on direct execution and shell aliases.
274
+ * **2026-11-16**: Restored missing `get_git_branch` function.
275
+ * **2026-11-16**: Added standard UNIX ls extensions: `--inode`, `-O` (octal), `-n` (numeric IDs).
276
+ * **2026-11-16**: Added alternate timestamp sorting: `-u` (access time) and `-c` (change time).
277
+ * **2026-11-16**: Implemented dynamic ACL (`+`) detection by parsing background `ls` output.
278
+ * **2026-11-16**: Added TUI runtime toggles for Inode (`I`), Octal (`O`), and Numeric (`N`) views.
279
+ * **2026-11-16**: Added clean KeyboardInterrupt exit to suppress Ctrl+C tracebacks.
280
+ * **2026-11-16**: Fixed `-D` (dataset) display for files and implemented zFS mount point caching.
281
+ * **2026-11-16**: Added dynamic column headers (CLI/TUI) and TUI horizontal separator.
282
+ * **2026-11-16**: Added TUI support for shell globbing (e.g., `zeza --tui z*`).
283
+ * **2026-11-16**: Removed `.` from lists; explicitly pinned `..` to the top of all sorts.
284
+ * **2026-11-15**: Initial TUI integration with colorized views and basic navigation.
285
+ * **2026-11-14**: Initial CLI layout, z/OS specific integrations, and sorting capabilities.
zeza-1.7.0/README.md ADDED
@@ -0,0 +1,256 @@
1
+ # zeza
2
+
3
+ **A feature-rich Python clone of the `eza` (modern ls) utility specifically tailored for IBM z/OS UNIX System Services (USS).**
4
+
5
+ The command, repository, and default script are named `zeza`.
6
+
7
+ ## Description
8
+
9
+ `zeza` provides robust colorized terminal output, native EBCDIC/ASCII tag support (`chtag`), extended attribute inspection (`extattr`), zFS dataset resolution, and Git status integration.
10
+
11
+ It features both a standard CLI format and an interactive full-screen Text User Interface (TUI) for navigating, sorting, filtering, customizing columns, inspecting, editing, modifying z/OS attributes (`chtag`, `extattr`, `chmod`), and managing files directly on the mainframe.
12
+
13
+ ## Sample Output
14
+
15
+ Running `zeza.py -laTgD` inside a z/OS USS Git repository (note how `-D` only prints the dataset on the first entry or when a file/directory crosses into a different zFS dataset):
16
+
17
+ ```text
18
+ . [ZOWE.ZFS.USERS] on  main:
19
+ Permissions Ln User Group Size Modified Git Tag Info Name [Dataset]
20
+ drwxr-xr-x 39 LBDYCK ZOWEDEV 8.0K Nov 16 16:00 -- .. [ZOWE.ZFS.USERS]
21
+ drwxr-xr-x 7 LBDYCK ZOWEDEV 8.0K Nov 17 08:15 -- .git
22
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 1.0K Nov 16 16:00 -- t UTF-8 LICENSE
23
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 7.4K Nov 18 13:15 M t ISO8859-1 README.md
24
+ -rw-r--r-- 1 LBDYCK ZOWEDEV 6.1K Nov 18 13:15 -- t ISO8859-1 zeza.1
25
+ -rwxr-xr-x 1 LBDYCK ZOWEDEV 64.8K Nov 18 13:15 -- t ISO8859-1 zeza.py
26
+ ```
27
+
28
+ ## Prerequisites
29
+
30
+ * **Base z/OS USS Utilities:** Uses standard built-in z/OS commands (`ls`, `df`, `extattr`, `chtag`, `getfacl`) for metadata, file tagging, ACLs, and zFS mount resolution.
31
+ * **Python 3:** Requires `python3` (such as IBM Open Enterprise SDK for Python or the [zopen community](https://zopen.community/) Python port).
32
+ * **Optional Dependencies:**
33
+ * `git` (via zopen community or Rocket) for `-g` / `--git` repository status and branch display.
34
+ * `zotman` / `man-db` (via zopen community) for viewing and indexing the `ISO8859-1` `zeza.1` manpage natively.
35
+ * A [Nerd Font](https://www.nerdfonts.com/) installed on your local terminal emulator (e.g., Windows Terminal, iTerm2, WezTerm) if using `-i` / `--icons`.
36
+
37
+ ## Installation
38
+
39
+ Install the published package from PyPI:
40
+
41
+ ```bash
42
+ python3 -m pip install zeza
43
+ ```
44
+
45
+ The `zeza` command is provided by the package:
46
+
47
+ ```bash
48
+ zeza --help
49
+ zeza --version
50
+ zeza --tui
51
+ ```
52
+
53
+ To install from a source checkout:
54
+
55
+ ```bash
56
+ python3 -m pip install .
57
+ ```
58
+
59
+ To install directly without pip:
60
+
61
+ ```bash
62
+ python3 install.py --prefix /usr/local
63
+ ```
64
+
65
+ The installer copies the executable to `bin/zeza` and the manpage to
66
+ `share/man/man1/zeza.1` under the prefix. The prefix must be absolute; it
67
+ defaults to `$PREFIX` or `/usr/local`. Installed files are tagged as
68
+ ISO8859-1 when `chtag` is available.
69
+
70
+ ## Usage & Recommended Aliases
71
+
72
+ You can run the installed command or the utility directly from a source checkout:
73
+
74
+ ```bash
75
+ zeza [OPTIONS] [PATHS...]
76
+ python3 zeza.py [OPTIONS] [PATHS...]
77
+ ```
78
+
79
+ For daily use, add `zeza.py` to your `PATH` (or symlink it) and add these convenient shortcuts to your `~/.bashrc` or `~/.zshrc`:
80
+
81
+ ```bash
82
+ # Base command aliases
83
+ alias zeza='/path/to/zeza/zeza.py'
84
+
85
+ # Common workflow shortcuts
86
+ alias ll='zeza -l --group-directories-first' # Long listing with dirs first
87
+ alias la='zeza -la' # Long listing including hidden files
88
+ alias lt='zeza -laT' # Long listing with z/OS file tags
89
+ alias lg='zeza -laTg' # Long listing with file tags and Git status
90
+ alias lzd='zeza -lD' # Show underlying zFS datasets when they change
91
+ alias lx='zeza -lx' # Show z/OS extended attributes (APF, ProgCtl)
92
+ alias ltree='zeza --tree -L 2' # Recursive tree view (2 levels deep)
93
+ alias ztui='zeza --tui' # Launch interactive full-screen TUI
94
+ ```
95
+
96
+ ## Manpage Installation (`zotman` / `man-db`)
97
+
98
+ The included `zeza.1` manpage is maintained in ASCII (`ISO8859-1`) and is designed to work seamlessly with `zotman` (`man-db`) from the [zopen community](https://zopen.community/) project. The direct installer places it in the prefix's `share/man/man1` directory and tags it as ISO8859-1 when `chtag` is available.
99
+
100
+ To preview the manpage directly from the repository directory:
101
+
102
+ ```bash
103
+ zotman ./zeza.1
104
+ ```
105
+
106
+ After installation, run `mandb` from your environment to index the page so
107
+ `man` and `apropos` can locate it:
108
+
109
+ ```bash
110
+ man zeza
111
+ ```
112
+
113
+ Or use `zotman zeza` from the zopen environment.
114
+
115
+ ## CLI Options
116
+
117
+ | Flag | Description |
118
+ | :--- | :--- |
119
+ | `paths` | Files or directories to list (default: current directory). |
120
+ | `-a`, `--all` | Show hidden files (starting with `.`). |
121
+ | `-l`, `--long` | Display extended metadata (perms, links, owner, group, size, time). |
122
+ | `-g`, `--git` | Show Git status badges and the current branch. |
123
+ | `-t`, `--time` | Sort by modification time (newest first). |
124
+ | `-u`, `--access` | Sort/display by last access time (atime). |
125
+ | `-c`, `--ctime` | Sort/display by status change time (ctime). |
126
+ | `-i`, `--icons` | Display Nerd Font icons next to filenames. |
127
+ | `--inode` | Display the file serial number (inode). |
128
+ | `-O`, `--octal` | Display file permissions in octal format. |
129
+ | `-n`, `--numeric` | List numeric UIDs and GIDs instead of names. |
130
+ | `-b`, `--blocks` | Display file sizes in 512-byte blocks instead of bytes. |
131
+ | `-J`, `--json FILE` | Export directory listing data to a specified JSON file. |
132
+ | `-e`, `--ext EXT` | Filter by comma-separated file extensions (e.g., txt,rex,c). |
133
+ | `-R`, `--regex PATTERN` | Filter files matching a regular expression. |
134
+ | `-T`, `--tags` | Display z/OS file tags (state, codeset). |
135
+ | `-x`, `--extattr` | Display z/OS extended attributes (APF, program control, etc.). |
136
+ | `--tree` | Display output in a recursive tree topology. |
137
+ | `-L`, `--level DEPTH` | Limit the recursion depth of the `--tree` display. |
138
+ | `--group-directories-first` | List directories before regular files across any sort order. |
139
+ | `-d`, `--directory` | List directories themselves, not their contents. |
140
+ | `-S`, `--sort-size` | Sort files by size (largest first). |
141
+ | `-r`, `--reverse` | Reverse the current sort order. |
142
+ | `-1`, `--oneline` | Display one entry per line. |
143
+ | `-D`, `--dsn` | Show underlying zFS dataset names (displayed on the first entry and whenever the dataset changes). |
144
+ | `--color WHEN` | When to use terminal colors: `auto`, `always`, `never` (default: `auto`). |
145
+ | `--no-color` | Disable all terminal colors (alias for `--color=never`). Also respects the `NO_COLOR` environment variable. |
146
+ | `--tui` | Launch the interactive fullscreen Text User Interface. |
147
+ | `-v`, `--version` | Show program's version number and exit. |
148
+ | `-h`, `--help` | Show the CLI help message and exit. |
149
+
150
+ ## TUI Hotkeys (Single-Column Reference)
151
+
152
+ * **`UP / DOWN`** : Navigate cursor up or down line by line
153
+ * **`PgUp / PgDn`** : Scroll the directory listing or file viewer by page
154
+ * **`Home / End`** : Jump to the first or last entry in the directory or file viewer
155
+ * **`ENTER`** : Open directory or view file in the built-in pager (supports live ASCII, EBCDIC `IBM-1047`, and Hex dump modes)
156
+ * **`ESC`** : Go up one directory or close active modal/view (25ms fast response)
157
+ * **`.`** : Toggle display of hidden dotfiles (`-a`)
158
+ * **`d`** : Toggle grouping directories before regular files (`[Dirs1st]`)
159
+ * **`i`** : Inspect full file metadata (permissions, ACLs, `chtag`, `extattr`, zFS dataset/mount, timestamps, and Git status)
160
+ * **`e`** : Edit selected file in configured editor (`$EDITOR` or `vi`)
161
+ * **`m`** : Create a new directory (`mkdir` popup dialog)
162
+ * **`A`** : Create a new empty file (popup dialog)
163
+ * **`p`** : Change file permissions (`chmod` octal popup dialog)
164
+ * **`u`** : Change z/OS file tag (`chtag` popup menu for `ISO8859-1`, `IBM-1047`, `UTF-8`, custom codeset, binary, mixed, or untagged)
165
+ * **`x`** : Modify z/OS extended attributes (`extattr` checklist popup for `+a`/`-a`, `+p`/`-p`, `+s`/`-s`, `+l`/`-l`)
166
+ * **`C`** : Copy selected file or directory (opens centered popup input modal)
167
+ * **`R`** : Rename selected file or directory (opens centered popup input modal)
168
+ * **`D`** : Delete selected file or directory (opens centered confirmation popup modal)
169
+ * **`s`** : Sort by file size (largest first)
170
+ * **`t`** : Sort by modification time (`mtime`)
171
+ * **`a`** : Sort by last access time (`atime`)
172
+ * **`z`** : Sort by status change time (`ctime`)
173
+ * **`n`** : Sort by filename
174
+ * **`r`** : Reverse current sort order
175
+ * **`f`** or **`/`** : Filter files in the current directory by substring
176
+ * **`c`** : Clear active filter (or cycle `AUTO` -> `ISO8859-1` -> `IBM-1047` -> `HEX` inside the File Viewer)
177
+ * **`h`** : Toggle side-by-side Hex / ASCII / EBCDIC (`IBM-1047`) dump inside the File Viewer
178
+ * **`v`** : Open interactive **TUI Columns Menu** to add or remove any column (`SPACE`/`ENTER` or shortcut key to toggle, `a` for all, `d` for default, and `s` to save when `Save Columns` is enabled in `o` Settings)
179
+ * **`I`** : Toggle Inode column visibility
180
+ * **`O`** : Toggle Octal permissions column
181
+ * **`N`** : Toggle Numeric UID and GID display
182
+ * **`G`** : Toggle Git status column
183
+ * **`T`** : Toggle z/OS File Tags (`chtag`) column
184
+ * **`X`** : Toggle z/OS Extended Attributes (`[apsl]`) column
185
+ * **`M`** : Toggle zFS Dataset column
186
+ * **`B`** : Toggle 512-byte Blocks size display
187
+ * **`W`** : Toggle Nerd Font Icons display
188
+ * **`o`** : Open colorized Settings menu (configure default editor, toggle `Save Columns` ON/OFF, and preview/save colors)
189
+ * **`F1`** : Show colorized Help tutorial
190
+ * **`q`** : Quit current view or exit TUI
191
+
192
+ ## Configuration & Environment Variables
193
+
194
+ When you save settings inside the TUI (by pressing `o` then `s`), preferences are stored in `~/.pyeza.json` and confirmed via a popup message. By default, `"save_columns"` is set to `false` (`< OFF >`), meaning column changes in the `v` Columns Menu apply only to the current TUI session. If you toggle `Save Columns` to `< ON >` in the `o` Settings menu, pressing `s` inside the `v` Columns Menu will persist your active column layout to `~/.pyeza.json`:
195
+
196
+ ```json
197
+ {
198
+ "editor": "vim",
199
+ "save_columns": false,
200
+ "color_dir": 4,
201
+ "color_exe": 2,
202
+ "color_sym": 6,
203
+ "color_def": 7
204
+ }
205
+ ```
206
+
207
+ *(Color codes follow standard curses/ANSI indices: `0`=Black, `1`=Red, `2`=Green, `3`=Yellow, `4`=Blue, `5`=Magenta, `6`=Cyan, `7`=White).*
208
+
209
+ **Environment Variables:**
210
+
211
+ * `EDITOR`: Default text editor for the TUI `e` hotkey if not overridden in `~/.pyeza.json` (defaults to `vi`).
212
+ * `LS_COLORS`: Standard UNIX color definitions (`di`, `ex`, `ln`, `fi`) are automatically respected in CLI output.
213
+ * `NO_COLOR`: If set in your environment, disables ANSI colors by default (per [no-color.org](https://no-color.org/)).
214
+
215
+ ## z/OS USS Encoding & Polyglot Header Note
216
+
217
+ On z/OS USS, ASCII tools like zopen `vim` and `git` expect source files to be encoded and tagged as `ISO8859-1` or `UTF-8`, whereas the z/OS kernel requires `IBM-1047` (EBCDIC) to parse `#!` shebang lines during direct execution.
218
+
219
+ To allow `zeza.py` to remain in `ISO8859-1` (so you can edit it cleanly in `vim`) while still executing directly from your shell (`./zeza.py`), line 2 of the script uses a POSIX shell/Python polyglot header:
220
+
221
+ ```python
222
+ #!/usr/bin/env python3
223
+ "exec" "python3" "$0" "$@"
224
+ ```
225
+
226
+ If you clone or transfer `zeza.py` to a new z/OS system, ensure its file tag and execute permissions are set properly:
227
+
228
+ ```bash
229
+ chtag -tc ISO8859-1 zeza.py zeza.1 README.md
230
+ chmod 755 zeza.py
231
+ ```
232
+
233
+ ## Change History
234
+
235
+ * **2026-11-18**: Added `Save Columns` option (`save_columns`, default: `OFF`) in the `o` Settings menu to optionally enable `s: Save` in the `v` Columns Menu; fixed line 2 background bleed in TUI popups using `curses.ACS_HLINE`; added interactive TUI modals for `chtag` (`u`), `chmod` (`p`), `extattr` (`x`), `mkdir` (`m`), and new file creation (`A`); added live `ISO8859-1`/`IBM-1047`/Hex dump switching (`c`, `h`) in the TUI file viewer; added `PgUp`/`PgDn`/`Home`/`End`, `.` dotfile toggle, and `d` group-directories-first in TUI; added CLI `--group-directories-first` and `-L`/`--level` tree depth options (v1.7.0).
236
+ * **2026-11-18**: Fixed `C` Copy hotkey collision in TUI (moved `ctime` sort to `z`), reduced `ESC` key delay to 25ms for instant response, added popup confirmation when saving TUI Settings and after Copy/Rename/Delete, updated `-D` to display the zFS dataset only when it changes, and formatted TUI hotkeys in a single-column layout across code, README, and manpage (v1.6.0).
237
+ * **2026-11-18**: Added interactive TUI Columns Menu (`v`) and direct hotkeys (`G`, `T`, `X`, `M`, `B`, `W`, `I`, `O`, `N`) to dynamically add or remove any display column, plus colorized the TUI Settings menu (`o`) with live color previews (v1.5.0).
238
+ * **2026-11-18**: Colorized TUI `F1` help tutorials and added centered, bordered popup modal dialogs for Copy (`C`), Rename (`R`), and Delete (`D`) operations (v1.4.0).
239
+ * **2026-11-17**: Added `zeza.1` manpage documentation with `zotman` (`man-db`) installation and `mandb` indexing instructions.
240
+ * **2026-11-17**: Added `i` hotkey in TUI to display a scrollable full-screen inspector with complete file metadata, ACLs, `chtag` info, `extattr` flags, zFS dataset/mount point, timestamps, and Git status (v1.3.0).
241
+ * **2026-11-17**: Added `-v` / `--version` flag and descriptive `--help` strings for all CLI options.
242
+ * **2026-11-17**: Added `--color` (`auto`, `always`, `never`), `--no-color`, and `NO_COLOR` environment variable support.
243
+ * **2026-11-16**: Added polyglot shell/Python `exec` header for direct execution while maintaining ASCII `vim` compatibility.
244
+ * **2026-11-16**: Streamlined documentation to focus on direct execution and shell aliases.
245
+ * **2026-11-16**: Restored missing `get_git_branch` function.
246
+ * **2026-11-16**: Added standard UNIX ls extensions: `--inode`, `-O` (octal), `-n` (numeric IDs).
247
+ * **2026-11-16**: Added alternate timestamp sorting: `-u` (access time) and `-c` (change time).
248
+ * **2026-11-16**: Implemented dynamic ACL (`+`) detection by parsing background `ls` output.
249
+ * **2026-11-16**: Added TUI runtime toggles for Inode (`I`), Octal (`O`), and Numeric (`N`) views.
250
+ * **2026-11-16**: Added clean KeyboardInterrupt exit to suppress Ctrl+C tracebacks.
251
+ * **2026-11-16**: Fixed `-D` (dataset) display for files and implemented zFS mount point caching.
252
+ * **2026-11-16**: Added dynamic column headers (CLI/TUI) and TUI horizontal separator.
253
+ * **2026-11-16**: Added TUI support for shell globbing (e.g., `zeza --tui z*`).
254
+ * **2026-11-16**: Removed `.` from lists; explicitly pinned `..` to the top of all sorts.
255
+ * **2026-11-15**: Initial TUI integration with colorized views and basic navigation.
256
+ * **2026-11-14**: Initial CLI layout, z/OS specific integrations, and sorting capabilities.
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "zeza"
7
+ version = "1.7.0"
8
+ description = "Modern eza-inspired file listing utility for IBM z/OS USS"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT"
12
+ authors = [
13
+ { name = "Lionel B. Dyck", email = "lbdyck@gmail.com" },
14
+ ]
15
+ keywords = ["eza", "files", "mainframe", "terminal", "tui", "uss", "zos"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Operating System :: POSIX",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3 :: Only",
22
+ "Programming Language :: Python :: 3.8",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Topic :: System :: Filesystems",
29
+ "Topic :: System :: Shells",
30
+ "Topic :: Utilities",
31
+ ]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/lbdyck/zeza"
35
+ Repository = "https://github.com/lbdyck/zeza"
36
+ Issues = "https://github.com/lbdyck/zeza/issues"
37
+
38
+ [project.scripts]
39
+ zeza = "zeza:main"
40
+
41
+ [tool.setuptools]
42
+ py-modules = ["zeza"]
43
+
44
+ [tool.setuptools.data-files]
45
+ "share/man/man1" = ["zeza.1"]
zeza-1.7.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+