From 6f41baabc318c73a66360c1f88a3ad98c30301f0 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 28 Mar 2025 21:00:07 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-28 21:00:07 --- .config/fish/functions/man.fish | 42 +++++++++++++++++++++++++++++++++ .zshrc | 3 +-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .config/fish/functions/man.fish diff --git a/.config/fish/functions/man.fish b/.config/fish/functions/man.fish new file mode 100644 index 00000000..d3426095 --- /dev/null +++ b/.config/fish/functions/man.fish @@ -0,0 +1,42 @@ +# https://github.com/decors/fish-colored-man/tree/master +function man --wraps man --description 'Format and display manual pages' + set -q man_blink; and set -l blink (set_color $man_blink); or set -l blink (set_color -o red) + set -q man_bold; and set -l bold (set_color $man_bold); or set -l bold (set_color -o B14242) + set -q man_standout; and set -l standout (set_color $man_standout); or set -l standout (set_color 949494) + set -q man_underline; and set -l underline (set_color $man_underline); or set -l underline (set_color -o D87C4A) + + set -l end (printf "\e[0m") + + set -lx LESS_TERMCAP_mb $blink + set -lx LESS_TERMCAP_md $bold + set -lx LESS_TERMCAP_me $end + set -lx LESS_TERMCAP_so $standout + set -lx LESS_TERMCAP_se $end + set -lx LESS_TERMCAP_us $underline + set -lx LESS_TERMCAP_ue $end + set -lx LESS '-R -s' + + set -lx GROFF_NO_SGR yes # fedora + + set -lx MANPATH (string join : $MANPATH) + if test -z "$MANPATH" + type -q manpath + and set MANPATH (command manpath) + end + + # Check data dir for Fish 2.x compatibility + set -l fish_data_dir + if set -q __fish_data_dir + set fish_data_dir $__fish_data_dir + else + set fish_data_dir $__fish_datadir + end + + set -l fish_manpath (dirname $fish_data_dir)/fish/man + if test -d "$fish_manpath" -a -n "$MANPATH" + set MANPATH "$fish_manpath":$MANPATH + command man $argv + return + end + command man $argv +end diff --git a/.zshrc b/.zshrc index cd7a380e..f054679c 100644 --- a/.zshrc +++ b/.zshrc @@ -218,8 +218,7 @@ eval "$(starship init zsh)" eval "$(zoxide init zsh)" eval "$(rip completions zsh)" # export DIRENV_LOG_FORMAT="" -export GPG_TTY=$(tty) -gpg-connect-agent updatestartuptty /bye >/dev/null +# export GPG_TTY=$(tty) # gpg-connect-agent updatestartuptty /bye >/dev/null # export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) # gpg-connect-agent /bye > /dev/null