From aa6e0cc1577f1625c64ccfd0ca0eb7f4f19865a5 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Sat, 8 Jan 2022 20:50:31 +0800 Subject: [PATCH] Skip more leading commands in `__fish_man_page` (#8612) * Skip leading `xargs` in `__fish_man_page` * Complete the list * `git` does not qualify either --- share/functions/__fish_man_page.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_man_page.fish b/share/functions/__fish_man_page.fish index 20ad88260..8615f5946 100644 --- a/share/functions/__fish_man_page.fish +++ b/share/functions/__fish_man_page.fish @@ -8,9 +8,9 @@ function __fish_man_page return end - #Skip leading `sudo`/`command` and display then manpage of following command + # Skip leading commands and display then manpage of following command while set -q args[2] - and string match -qr -- '^(sudo|command|.*=.*)$' $args[1] + and string match -qr -- '^(and|begin|builtin|caffeinate|command|doas|entr|env|exec|if|mosh|nice|not|or|pipenv|prime-run|setsid|sudo|systemd-nspawn|time|watch|while|xargs|.*=.*)$' $args[1] set -e args[1] end