Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mb] output garbage with inline help strings #4

Open
xmailla opened this issue Jan 2, 2025 · 1 comment
Open

[mb] output garbage with inline help strings #4

xmailla opened this issue Jan 2, 2025 · 1 comment

Comments

@xmailla
Copy link

xmailla commented Jan 2, 2025

mb -q or help command or even brief return some garbage take from mb script:

[mb] Reception> brief
commands/topics:
!         brief     decrypt   grep      index     new       rm        unspam
$2        cat       dirs      headers   ls        prompt    search
.         cd        extract   help      man       quit      send
//'       cp        find      inbox     mime      reply     spam
all       cur       fwd       inc       mv        restrict  sync
type msg# / sel msg# w/mouse in tmux and use . to see in new pane
use: brief for this short help again, help <topic> for longer help
sigs: ^\ (QUIT) = cur folder status, ^C (INT) = quit gracefully
[mb] Reception> help brief
brief [cmd] - print a brief usage summary/command list
[mb] Reception> help
! cmd ... - run a shell command
//' | head -1
. - a single dot displays the current message
//' | head -1
all [slice] - alias for cur
brief [cmd] - print a brief usage summary/command list
cat [msgno] - dump raw message to stdout
cd folder - switch to different folder
cp [msgno...] dest-folder - copy msg to given folder
cur [slice] - switch from new to cur in the current Maildir

This is due to how we try to extract informations from #+ strings in the script

@xmailla xmailla changed the title [mb] [mb] output garbage with inline help strings Jan 2, 2025
@xmailla
Copy link
Author

xmailla commented Jan 2, 2025

We should document which sed, grep, awk and such, to use for this to work perfectly.

I fixed all this stuff on my part but it is not really portable. Need to work it a little more before commiting my changes.

With my fix in place:

[mb] Reception> brief
commands/topics:
!         cd        extract   help      man       quit      send
.         cp        find      inbox     mime      reply     spam
all       cur       fwd       inc       mv        restrict  sync
brief     decrypt   grep      index     new       rm        unspam
cat       dirs      headers   ls        prompt    search
type msg# / sel msg# w/mouse in tmux and use . to see in new pane
use: brief for this short help again, help <topic> for longer help
sigs: ^\ (QUIT) = cur folder status, ^C (INT) = quit gracefully

No more garbage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant