Genivia / ugrep

NEW ugrep 7.1: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.66k stars 111 forks source link

PAGER/VISUAL vs --view #431

Closed Konfekt closed 1 month ago

Konfekt commented 1 month ago

Since the help/man page states that --view defines the Ctrl-Y binding, how about leaving the F2 key bound to ${PAGER:-${VISUAL:-$EDITOR}} so that a file can be quickly viewed and then opened if need be?

genivia-inc commented 1 month ago

Thank you for your feedback.

F2 is just the same as CTRL-Y in the TUI, but you can view a file with less and then edit it in less with the v command (press v):

NAME
       less - opposite of more

...

       v      Invokes an editor to edit the current file being viewed.  The editor is taken from the
              environment variable VISUAL if defined, or EDITOR if VISUAL is not defined, or defaults to
              "vi" if neither VISUAL nor EDITOR is defined.  See also the discussion of LESSEDIT under the
              section on PROMPTS below.
Konfekt commented 1 month ago

Okay, I guess that's good enough. Thank you for this suggestion