db33d9cff7
- logs.fish: add yay category, ov-powered viewing for paru/yay (section headers, color highlights, ==> AUR build markers) and scrollback logs (OSC 133;A sticky prompt headers); add fzf Ctrl-D delete with Y/n confirm and list refresh, ? toggleable help overlay; run _scrollback_prune_junk before building file list - _scrollback_prune_junk: new utility to remove empty, single-line, and Kitty tab-rename noise logs before display and before max-file pruning; called from both logs and smart_exit - smart_exit: call _scrollback_prune_junk before counting toward max files - conf.d/yay-wrapper.fish: auto-generate ~/.local/bin/yay logging wrapper mirroring paru-wrapper; tees output to timestamped logs, prunes old ones - conf.d/starship.fish: move fish_prompt from config.fish; emit OSC 133;A after the prompt's leading newline so the marker lands on the info-bar line rather than the blank line above it; guard with type -q starship so clean fish sessions use built-in markers unchanged - config.fish: remove inline fish_prompt block (now in conf.d/starship.fish); add return sentinel at EOF to prevent tool-injected init lines from running - completions/ov.fish: add ov tab completions - README.md: document all of the above
27 lines
900 B
Fish
27 lines
900 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
# Defines fish_prompt only when starship is installed.
|
|
# Without starship, fish's built-in prompt already emits OSC 133;A
|
|
# on the prompt line itself, so no wrapper is needed.
|
|
|
|
type -q starship; or return
|
|
|
|
function fish_prompt
|
|
set -l last_status $status
|
|
|
|
# Blank line between output and next prompt, skipped at the top of a cleared screen
|
|
if not test "$fish_private_mode" = true; and test (commandline) = ""
|
|
echo
|
|
end
|
|
|
|
# OSC 133;A here (after the blank line) puts the marker on the prompt line itself,
|
|
# not the blank line — required for ov's section-delimiter to pin the right line.
|
|
printf "\x1b]133;A\x07"
|
|
|
|
set -g STARSHIP_CMD_STATUS $last_status
|
|
command starship prompt --status=$last_status --pipestatus=$pipestatus --jobs=(count (jobs -p))
|
|
|
|
printf "\x1b]133;B\x07"
|
|
end
|