Skip to content

Commit

Permalink
fix: format man pages section
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Aug 19, 2024
1 parent b17d2dd commit cac37d7
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,41 +69,41 @@ func main() {
WithLongDescription(ProjectName+" a utility that copies text to your clipboard from anywhere using ANSI OSC 52 sequence.").
WithSection("Terminal", "shcopy should work in any terminal that supports OSC 52. There are some exceptions below.").
WithSection("Kitty", "Kitty, version 0.22.0 and below, had a bug where it appends to the"+
"clipboard instead of replacing it. To workaround this bug, clear"+
"the clipboard before copying any text."+
"\n"+
"shcopy -c; shcopy \"Hello World\"",
"clipboard instead of replacing it. To workaround this bug, clear"+
"the clipboard before copying any text."+
"\n"+
"shcopy -c; shcopy \"Hello World\"",
).
WithSection("Screen", "To use shcopy within a screen session, make sure that the outer"+
"terminal supports OSC 52. If your '$TERM' environment variable is"+
"not set to 'screen-*', use '--term screen' to force shcopy to work"+
"with screen.",
"terminal supports OSC 52. If your '$TERM' environment variable is"+
"not set to 'screen-*', use '--term screen' to force shcopy to work"+
"with screen.",
).
WithSection("Tmux",
"To use shcopy within a tmux session, make sure that the outer "+
"terminal supports OSC 52, and use one of the following options:"+
"\n"+
"1. Configure tmux to allow programs to access the clipboard "+
"(recommended). The tmux 'set-clipboard' option was added in tmux 1.5 with a "+
"default of 'on'; the default was changed to 'external' when "+
"'external' was added in tmux 2.6. Setting 'set-clipboard' to 'on' "+
"allows external programs in tmux to access the clipboard. To enable "+
"this option, add 'set -s set-clipboard on' to your tmux config."+
"\n"+
"2. Use '--term tmux' option to force shcopy to work with tmux. This "+
"option requires the 'allow-passthrough' option to be enabled in tmux. "+
"Starting with tmux 3.3a, the 'allow-passthrough' option is no "+
"longer enabled by default. This option allows tmux to pass an ANSI "+
"escape sequence to the outer terminal by wrapping it in another "+
"special tmux escape sequence. This means the '--term tmux' option "+
"won't work unless you're running an older version of tmux or you "+
"have enabled 'allow-passthrough' in tmux. Add the following to your "+
"tmux config to enable passthrough 'set -g allow-passthrough on'."+
"\n"+
"Refer to https://github.com/tmux/tmux/wiki/Clipboard for more info.",
WithSection("Tmux",
"To use shcopy within a tmux session, make sure that the outer "+
"terminal supports OSC 52, and use one of the following options:"+
"\n"+
"1. Configure tmux to allow programs to access the clipboard "+
"(recommended). The tmux 'set-clipboard' option was added in tmux 1.5 with a "+
"default of 'on'; the default was changed to 'external' when "+
"'external' was added in tmux 2.6. Setting 'set-clipboard' to 'on' "+
"allows external programs in tmux to access the clipboard. To enable "+
"this option, add 'set -s set-clipboard on' to your tmux config."+
"\n"+
"2. Use '--term tmux' option to force shcopy to work with tmux. This "+
"option requires the 'allow-passthrough' option to be enabled in tmux. "+
"Starting with tmux 3.3a, the 'allow-passthrough' option is no "+
"longer enabled by default. This option allows tmux to pass an ANSI "+
"escape sequence to the outer terminal by wrapping it in another "+
"special tmux escape sequence. This means the '--term tmux' option "+
"won't work unless you're running an older version of tmux or you "+
"have enabled 'allow-passthrough' in tmux. Add the following to your "+
"tmux config to enable passthrough 'set -g allow-passthrough on'."+
"\n"+
"Refer to https://github.com/tmux/tmux/wiki/Clipboard for more info.",
).
WithSection("Bugs", "Report bugs to https://github.com/aymanbagabas/shcopy/issues").
WithSection("Copyright", "(C) 2023 Ayman Bagabas.\n"+
WithSection("Copyright", "(C) 2024 Ayman Bagabas.\n"+
"Released under MIT license.")

pflag.VisitAll(mpflag.PFlagVisitor(manPage))
Expand Down

0 comments on commit cac37d7

Please sign in to comment.