Skip to content

Drazape/fish-helpText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Fish library to generate formatted ANSI help reference texts using an intuitive syntax

Demonstration

help-text (self)

help-text 'Generate help reference text' https://Drazape.github.io/fish-helpText/ \
	--position='Description | The purpose of the command' \
	--flag={
		'positional:p | Individual positional arguments',
		'flag:f | Individual switches'
	}
help-text (self)
begin
	set --local inherited \ (set_color white)'(inherited from '(set_color --reset --background=red)abbr(set_color --reset white)\)(set_color --reset)
	help-text 'Abbreviate subcommands' \
		--positional={
			'+Initial Args | All arguments that come before the Sub-Command', 
			'Sub-Command | Comes after the Base Command; replaced by the Expansion',
			'Expansion | Replaces the Sub-Command'
		} \
		--switch={
			'help:h | Show this reference manual',
			'norun0:0 | Disable '(set_color --background=red)run0(set_color --reset)' toleration for abbreviations',
			'regard-flags:s | Acknowledge flags in the Base Command',
			'set-cursor:c | Position the cursor at '(set_color --background=brblack)%(set_color --reset)' post-expansion'{$inherited},
			'regex:r | Match Sub-Command with Regex. Essential for multiple Base Commands'{$inherited}
		}
end
sub-abbr

Important

See the documentation for usage

Installation

User

Fisher: fisher install Drazape/fish-helpText

System

curl -fsSL 'https://raw.githubusercontent.com/Drazape/fish-helpText/main/install.fish' | run0 fish -NP