tome icon indicating copy to clipboard operation
tome copied to clipboard

tome should print the help text

Open indrat opened this issue 2 months ago • 0 comments

The documentation has a section on adding help text which implies that tome should be able to print out the help for a script.

However invoking t help script only prints the list of commands and the summary for each script:

$ eval "$(tome init t ~/src/tome/example/ zsh)"  
$ t help file_example
This is an instance of tome, running against the directory src/tome/example/. 
The commands are namespaced by the directory structure. 
Builtin commands available to all instance of tome are: 
 commands: print all commands
 tome: currently a no-op. reserved namespace for future tome commands
 exec: execute a command
 help: print help for the command 
Full list of commands available are: 
 source_example: an example for sourcing variables
 file_example: hey'
 .foo: 
 test_files file_example_no_completion: hey'
 source_example_fish: an example for sourcing variables
 use-arg: 
 practical_examples navigate_directory: navigate to a directory within the ~/sandbox directory
 dir_example foo: 
 dir_example bar:

I would expect tome help script to print the summary and help from the script, eg:

$ eval "$(tome init t ~/src/tome/example/ zsh)"  
$ t help file_example
file_example: hey'
this is an example of a simple script written in python.

Or given a directory then only print the commands in the directory:

$ eval "$(tome init t ~/src/tome/example/ zsh)"  
$ t help dir_example
This is an instance of tome, running against the directory src/tome/example. 
The commands are namespaced by the directory structure. 
Builtin commands available to all instance of tome are: 
 commands: print all commands
 tome: currently a no-op. reserved namespace for future tome commands
 exec: execute a command
 help: print help for the command 
The list of dir_example commands available are:
 dir_example foo:
 dir_example bar:

indrat avatar Sep 25 '25 10:09 indrat