[man] Escape hyphens to prevent conversion to Unicode hyphens (#3885)

ASCII hyphens (U+002D HYPHEN-MINUS) in the option names (e.g. -x and
--extended) and the code examples in the man pages should be escaped
as \- (e.g. \-x and \-\-extended) to prevent them being converted to
Unicode hyphens in some environments.

For example, in openSUSE Tumbleweed, the raw ASCII hyphens in the
man-page sources are configured to be the Unicode hyphen (U+2010
HYPHEN).  This makes it impossible to search the option name in the
man page by e.g. /--extended[RET].  A problem also arises in copying
and pasting option names and code examples from the man page.  It
appears to be the normal ASCII hyphens by appearance (in typical
terminal fonts) but are not recognized as the ASCII hyphens by the
`fzf` command.
This commit is contained in:
Koichi Murase 2024-06-24 09:32:35 +09:00 committed by GitHub
parent a70ea4654e
commit 1525768094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 481 additions and 481 deletions

View File

@ -21,48 +21,48 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
.TH fzf-tmux 1 "Jun 2024" "fzf 0.53.0" "fzf-tmux - open fzf in tmux split pane"
.TH fzf\-tmux 1 "Jun 2024" "fzf 0.53.0" "fzf\-tmux - open fzf in tmux split pane"
.SH NAME
fzf-tmux - open fzf in tmux split pane
fzf\-tmux - open fzf in tmux split pane
.SH SYNOPSIS
.B fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS]
.B fzf\-tmux [LAYOUT OPTIONS] [\-\-] [FZF OPTIONS]
.SH DESCRIPTION
fzf-tmux is a wrapper script for fzf that opens fzf in a tmux split pane or in
fzf\-tmux is a wrapper script for fzf that opens fzf in a tmux split pane or in
a tmux popup window. It is designed to work just like fzf except that it does
not take up the whole screen. You can safely use fzf-tmux instead of fzf in
not take up the whole screen. You can safely use fzf\-tmux instead of fzf in
your scripts as the extra options will be silently ignored if you're not on
tmux.
.SH LAYOUT OPTIONS
(default layout: \fB-d 50%\fR)
(default layout: \fB\-d 50%\fR)
.SS Popup window
(requires tmux 3.2 or above)
.TP
.B "-p [WIDTH[%][,HEIGHT[%]]]"
.B "\-p [WIDTH[%][,HEIGHT[%]]]"
.TP
.B "-w WIDTH[%]"
.B "\-w WIDTH[%]"
.TP
.B "-h WIDTH[%]"
.B "\-h WIDTH[%]"
.TP
.B "-x COL"
.B "\-x COL"
.TP
.B "-y ROW"
.B "\-y ROW"
.SS Split pane
.TP
.B "-u [height[%]]"
.B "\-u [height[%]]"
Split above (up)
.TP
.B "-d [height[%]]"
.B "\-d [height[%]]"
Split below (down)
.TP
.B "-l [width[%]]"
.B "\-l [width[%]]"
Split left
.TP
.B "-r [width[%]]"
.B "\-r [width[%]]"
Split right

File diff suppressed because it is too large Load Diff