Minor fixes to reading README.md via daisy_help/daisy_list
This commit is contained in:
parent
3eeb4e2d7f
commit
6f8d3acc39
1 changed files with 4 additions and 5 deletions
|
|
@ -353,7 +353,7 @@ function daisy_quit_if_no
|
|||
# Help function, courtesy of Google Gemini
|
||||
function daisy_help() {
|
||||
local target_tool="$1"
|
||||
local file="README.md" # Updated filename
|
||||
local file="$DAISY_FOLDER/README.md"
|
||||
|
||||
# 1. Extract the block between the new headers
|
||||
sed -n '/--- BEGIN OF DAISY HELP ---/,/--- END OF DAISY HELP ---/{//!p;}' "$file" | \
|
||||
|
|
@ -397,10 +397,10 @@ function daisy_help() {
|
|||
}
|
||||
|
||||
# Print description lines if we are in a "found" block
|
||||
printing {
|
||||
printing {
|
||||
# Stop if we hit the start of the NEXT tool
|
||||
if ($0 ~ /^[[:space:]]*- /) { printing=0; next }
|
||||
print
|
||||
print
|
||||
}
|
||||
|
||||
END {
|
||||
|
|
@ -414,8 +414,7 @@ function daisy_help() {
|
|||
|
||||
# Courtesy of Google Gemini
|
||||
daisy_list() {
|
||||
local file="README.md"
|
||||
|
||||
local file="$DAISY_FOLDER/README.md"
|
||||
echo "Available LACKADAISICAL commands:"
|
||||
|
||||
# Extract block -> Find tool lines -> Clean formatting -> Print
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue