functions/__scriptura_help.fish (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function __scriptura_help --argument-names file_or_dir
if path is --type dir $file_or_dir
set --function help_file $file_or_dir/help
else
set --function help_file $file_or_dir.help
end
if path is --type file $help_file
__scriptura_cat $help_file
else if path is --type dir $file_or_dir
echo "$(path basename $file_or_dir) commands"
else if path is --type file $file_or_dir
echo $(__scriptura_desc $file_or_dir)
else
echo "Unknown type"
end
end
|