Commit Graph

8 Commits

Author SHA1 Message Date
Junegunn Choi f2a79ab8aa Add --header-border=inline / --header-lines-border=inline / --footer-border=inline
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Adds a new BorderShape, BorderInline, accepted as a value for
--header-border, --header-lines-border, and --footer-border. When the
surrounding --list-border has both top and bottom horizontals (rounded,
sharp, bold, double, thinblock, block, horizontal), the corresponding
section is rendered inside the list frame separated from the list
content by a horizontal line whose endpoints join the list border as
T-junctions. Without a compatible list border, the shape falls back to
BorderLine.

Supports:
  - All three layouts (default, reverse, reverse-list).
  - Any combination of the three inline sections, producing stacked
    separators.
  - --header-label and --footer-label rendered on their separator row.
  - Section colors: the portion of the list frame adjacent to an inline
    section (left/right verticals on the section's content rows plus the
    outer top/bottom edge + corners when the section is at the edge)
    inherits the section's --color *-border and *-bg, giving each section
    a uniform color block. The separator itself carries the section's
    colors since it acts as the section's inner edge.
  - When --color header-border / --color footer-border is not set, the
    inline section inherits --color list-border so the default palette
    stays coherent.
  - thinblock / block styles pick the horizontal char (top vs bottom)
    based on which side of the list content the separator sits on, so
    the thin line visually hugs the list content.

Rejects combinations that do not make sense:
  - --input-border=inline / --list-border=inline / --preview-border=inline
  - --header-first + (--header-border=inline | --header-lines-border=inline)
  - --header-border=inline with a non-inline --header-lines-border
    (inline has to propagate inward toward the list content).
2026-04-19 14:39:56 +09:00
Junegunn Choi 791aad83be test: add click-header and click-footer coverage
Simulate SGR 1006 mouse events through tmux send-keys -l (toggling the
global `mouse` option off for the duration of the injection so tmux
does not intercept the escapes) to exercise FZF_CLICK_HEADER_* and
FZF_CLICK_FOOTER_* across all three layouts, both without a header
border and with a framing border.

Also documents the existing quirk that header-lines are rendered in
reverse visual order under --layout=default, so the reported LINE value
flips in that case.
2026-04-19 14:39:56 +09:00
bitraid 23164c2263 fish: Completion script rewrite (SHIFT-TAB) 2026-04-04 09:47:59 +09:00
bitraid 385cccd362 fish: Command history improvements (#4672)
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
This change provides the following improvements:

- Changes the view of the command history list, so that the script no longer depends on perl for performance.
- Enables syntax color highlighting on fish v4.3.3 and newer.
- Provides a preview window with the selected commands, and expanded view of the highlighted command if available.
- Improves the delete functionality, by successfully handling very large numbers of selected commands.
- Inserts commands in their formatted form with `<Alt-Enter>`.

---

* fish: Change history list view

The view of the command history is changed, so that no manipulation is
performed on the output of history command: The history item count
number is replaced by the Unix time of the command, multi-line display
is disabled and line wrapping is enabled by default. On fish v4.3.3
and newer, the use of ANSI color codes for syntax highlighting is now
possible, while the script no longer depends on perl for performance.

Fixes #4661

* fish: Reformat selected history commands with ALT-ENTER

* Add $FZF_WRAP environment variable

The variable is set when line wrapping is enabled. It has the value
`word` if word wrapping mode is set, otherwise it has the value `char`.

* fish: Add command history preview

The preview shows the highlighted command and any selected commands,
after first being formatted and colorized by fish_indent. The timestamp
of the highlighted command in the preview is converted to strftime
format "%F %a %T" if the date command is available.

The preview is hidden on start, and is displayed if more than 100
columns are available and one of the following conditions are met:
- The highlighted item doesn't completely fit in list view (line
wrapping is enabled for the preview and is now disabled for the list).
- The highlighted item contains newlines (multi-line commands or
strings).
- The highlighted item contains chained commands in a single line, that
can be broken down by the formatter for cleaner view.
- One or more commands are marked as selected.

* fish: Handle deletion of large number of selected history entries

* fish: Change wrapping options for the preview-window
2026-02-19 23:41:26 +09:00
LM 7e62b34087 Add fish completion support (#4605)
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
2026-02-05 12:50:26 +09:00
Junegunn Choi ca294109c3 Apply RuboCop suggestions
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-09-22 21:23:54 +09:00
Junegunn Choi a67aa85820 Style change: thinner gutter column (#4521) 2025-09-16 21:22:56 +09:00
Junegunn Choi 0237bf09bf Split integration test file (#4205)
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-25 19:57:40 +09:00