From c977ac1c6d29180534f751abb257868ae656d414 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Sat, 27 Jan 2024 13:36:54 -0700 Subject: [PATCH] fish: vfunc: Show Python scripts instead of the wrapper Signed-off-by: Nathan Chancellor --- fish/functions/vfunc.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fish/functions/vfunc.fish b/fish/functions/vfunc.fish index 36cc09a38..ccc624ab8 100644 --- a/fish/functions/vfunc.fish +++ b/fish/functions/vfunc.fish @@ -3,5 +3,10 @@ # Copyright (C) 2022-2023 Nathan Chancellor function vfunc -d "View function defintion in fish with a pager" - type $argv &| bat --color always --language fish --style plain + set func_file $PYTHON_SCRIPTS_FOLDER/$argv.py + if test -f "$func_file" + vw -c $func_file + else + type $argv &| bat --color always --language fish --style plain + end end