Up to [cvs.NetBSD.org] / pkgsrc / textproc / jless
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 23 06:37:53 2023 UTC (5 weeks, 3 days ago) by wiz
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +3 -4
lines
Diff to previous 1.9 (colored)
*: update for Python base package change Instead of depending on one of the removed packages (that are now included in the base Python packages), include batteries-included.mk to require a Python version that supplies them. Remove now included packages. Bump PKGREVISION.
Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 14 05:25:23 2023 UTC (3 months, 2 weeks ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2023Q3-base,
pkgsrc-2023Q3
Changes since 1.8: +2 -1
lines
Diff to previous 1.8 (colored)
*: recursive bump for Python 3.11 as new default
Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 17 20:47:18 2023 UTC (4 months, 1 week ago) by pin
Branch: MAIN
Changes since 1.7: +2 -2
lines
Diff to previous 1.7 (colored)
textproc/jless: update to 0.9.0 v0.9.0 (2023-07-16) ================== New features: - A new command `ys` will copy unescaped string literals to the clipboard. Control characters remain escaped. - The length of Arrays and size of Objects is now shown before the container previews, e.g., (`foo: (3) ["apple", "banana", "cherry"]`) - Add a new family of "print" commands, that nearly map to the existing copy commands, that will simply print a value to the screen. This is useful for viewing the entirety of long string values all at once, or if the clipboard functionality is not working; mouse-tracking will be temporarily disabled, allowing you to use your terminal's native clipboard capabilities to select and copy the desired text. - Support showing line numbers, both absolute and/or relative. Absolute line numbers refer to what line number a given node would appear on if the document were pretty printed. This means there are discontinuities when in data mode because closing brackets and braces aren't displayed. Relative line numbers show how far a line is relative to the currently focused line. The behavior of the various combinations of these settings matches vim: when using just relative line numbers alone, the focused line will show `0`, but when both flags are enabled the focused line will show its absolute line number. - Absolute line numbers are enabled by default, but not relative line numbers. These can be enabled/disabled/re-enabled via command line flags `--line-numbers`, `--no-line-numbers`, `--relative-line-numbers` and `--no-relative-line-numbers`, or via the short flags `-n`, `-N`, `-r`, and `-R` respectively. - These settings can also be modified while jless is running. Entering `:set number`/`:set relativenumber` will enable these settings, `:set nonumber`/`:set norelativenumber` will disable them, and `:set number!`/`:set relativenumber!` will toggle them, matching vim's behavior. - There is not yet support for a jless config file, so if you would like relative line numbers by default, it is recommended to set up an alias: `alias jless=jless --line-numbers --relative-line-numbers`. - You can jump to an exact line number using `<count>g` or `<count>G`. When using `<count>g` (lowercase 'g'), if the desired line number is hidden inside of a collapsed container, the last visible line number before the desired one will be focused. When using `<count>G` (uppercase 'G'), all the ancestors of the desired line will be expanded to ensure it is visible. - Add `C` and `E` commands, analagous to the existing `c` and `e` commands, to deeply collapse/expand a node and all its siblings. Improvements: - In data mode, when a array element is focused, the highlighting on the index label (e.g., "[8]") is now inverted. Additionally, a 'דצ is always displayed next to the currently focused line, even if the focused node is a primitive. Together these changes should make it more clear which line is focused, especially when the terminal's current style doesn't support dimming (`ESC [ 2 m`). - When using the `c` and `e` commands (and the new `C` and `E` commands), the focused row will stay at the same spot on the screen. (Previously jless would try to keep the same row visible at the top of the screen, which didn't make sense.) Bug fixes: - Scrolling with the mouse will now move the viewing window, rather than the cursor. - When searching, jless will do a better job jumping to the first match after the cursor; previously if a user started a search while focused on the opening of a Object or Array, any matches inside that container were initially skipped over. - When jumping to a search match that is inside a collapsed container, search matches will continue to be highlighted after expanding the container. - [Issue #71 / PR #98]: jless will return a non-zero exit code if it fails to parse the input. Other notes: - The minimum supported Rust version has been updated to 1.67. - jless now re-renders the screen by emitting "clear line" escape codes (`ESC [ 2 K`) for each line, instead of a single "clear screen" escape code (`ESC [ 2 J`), in the hopes of reducing flicking when scrolling.
Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 14 13:19:19 2022 UTC (20 months, 2 weeks ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2023Q2-base,
pkgsrc-2023Q2,
pkgsrc-2023Q1-base,
pkgsrc-2023Q1,
pkgsrc-2022Q4-base,
pkgsrc-2022Q4,
pkgsrc-2022Q3-base,
pkgsrc-2022Q3,
pkgsrc-2022Q2-base,
pkgsrc-2022Q2,
pkgsrc-2022Q1-base,
pkgsrc-2022Q1
Changes since 1.6: +4 -1
lines
Diff to previous 1.6 (colored)
jless: add missing build dependencies
Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 11 10:22:27 2022 UTC (20 months, 2 weeks ago) by pin
Branch: MAIN
Changes since 1.5: +11 -2
lines
Diff to previous 1.5 (colored)
textproc/jless: update to 0.8.0 This new release of jless ships with two major new features: basic YAML support and copying to clipboard! jless will now check the file extension of the input file, and automatically parse .yml and .yaml files as YAML and use the same viewer as for JSON data. Alternatively passing in a --yaml flag will force jless to parse the input as YAML and can be used when reading in YAML data from stdin. (alias yless="jless --yaml" perhaps?) YAML aliases are automatically expanded, but their corresponding anchors are not visible, nor are comments. YAML supports non-string keys, and even non-scalar keys in mappings (e.g., the key of map can be an array with multiple elements). Non-string keys are shown with square brackets, e.g., [true]: "value", instead of quotes. Non-scalar keys are handled on the screen and displayed properly, but you cannot expand and collapse their individual elements. While navigating data, jless also now supports copying various items to your system clipboard. yy will copy the value of the currently focused node, pretty printed yv will copy the value of the currently focused node in a "nicely" printed one-line format yk will copy the key of the current key/value pair yp will copy the path from the root JSON element to the currently focused node, e.g., .foo[3].bar yb functions like yp, but always uses the bracket form for object keys, e.g., ["foo"][3]["bar"], which is useful if the environment where you'll paste the path doesn't support the .key format, like in Python yq will copy a jq style path that will select the currently focused node, e.g., .foo[].bar This release also includes a couple of new movement commands, and some stability fixes. The full list of changes can be seen below. Full list of changes New features: Support displaying YAML files with autodetection via file extension, or explicit --yaml or --json flags. Support copying values (with yy or yv), object keys (with yk), and paths to the currently focused node (with yp, yb or yq). Implement ctrl-u and ctrl-d commands to jump up and down by half the screen's height, or by a specified number of lines. Implement ctrl-b and ctrl-f commands for scrolling up and down by the height of the screen. (Aliases for PageUp and PageDown) Improvements: Keep focused line in same place on screen when toggling between line and data modes; fix a crash when focused on a closing delimiter and switching to data mode. Pressing Escape will clear the input buffer and stop highlighting search matches. Bug Fixes: Ignore clicks on the status bar or below rather than focusing on hidden lines, and don't re-render the screen, allowing the path in the status bar to be highlighted and copied. Issue #61: Display error message for unrecognized CSI escape sequences and other IO errors instead of panicking. Issue #62: Fix broken window resizing / SIGWINCH detection caused by clashing signal handler registered by rustyline. PR #54: Fix panic when using Ctrl-C or Ctrl-D to cancel entering search input. Other Notes: Upgraded regex crate to 1.5.5 due to CVE-2022-24713. jless accepts and compiles untrusted input as regexes, but you'd only DDOS yourself, so it's not terribly threatening vulnerability.
Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 21 09:43:40 2022 UTC (21 months, 1 week ago) by pin
Branch: MAIN
Changes since 1.4: +3 -4
lines
Diff to previous 1.4 (colored)
textproc/jless: update to 0.7.2 New features / changes: -Space now toggles the collapsed state of the currently focused node, rather than moving down a line. (Functionality was previous available via i, but was undocumented; i has been unmapped.) Bug fixes: -Searching now works even when input is provided via STDIN. Internal: -Upgraded from structopt to clap v3
Revision 1.4 / (download) - annotate - [select for diffs], Thu Feb 10 10:50:22 2022 UTC (21 months, 2 weeks ago) by pin
Branch: MAIN
Changes since 1.3: +1 -3
lines
Diff to previous 1.3 (colored)
Remove conflict flag
Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 10 08:31:22 2022 UTC (21 months, 2 weeks ago) by pin
Branch: MAIN
Changes since 1.2: +7 -2
lines
Diff to previous 1.2 (colored)
textproc/jless: rename command to avoid conflict with misc/ja-less.
Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 10 07:45:23 2022 UTC (21 months, 2 weeks ago) by wiz
Branch: MAIN
Changes since 1.1: +3 -1
lines
Diff to previous 1.1 (colored)
*: add conflict between ja-less and jless due to bin/jless
Revision 1.1 / (download) - annotate - [select for diffs], Wed Feb 9 17:02:46 2022 UTC (21 months, 2 weeks ago) by pin
Branch: MAIN
textproc/jless: import package jless is a command-line JSON viewer. Use it as a replacement for whatever combination of less, jq, cat and your editor you currently use for viewing JSON files. It is written in Rust and can be installed as a single standalone binary. Features -Clean syntax highlighted display of JSON data, omitting quotes around object keys, closing object and array delimiters, and trailing commas. -Expand and collapse objects and arrays so you can see both the high- and low-level structure of the data. -A wealth of vim-inspired movement commands for efficiently moving around and viewing data. -Full regex-based search for finding exactly the data you're looking for.