Can just link to the headings: https://www.dev-diaries.com/blog/terminal-history-auto-suggestions-as-you-type/#bonus-commands
&
Add in ability to click on a header and have that copy a link to that section, like Github does for code links. Show the clipboard copy link on hover of the heading