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

Deal with escaped characters in autogenerated man completions #7086

Closed
ammgws opened this issue Jun 6, 2020 · 3 comments
Closed

Deal with escaped characters in autogenerated man completions #7086

ammgws opened this issue Jun 6, 2020 · 3 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@ammgws
Copy link
Contributor

ammgws commented Jun 6, 2020

I am not familiar with how escaping works in manpages but it seems like some escape single quotes as '(cq' etc, which gets picked up as-is by the fish completion generation script. Might be nice to see if this could be fixed trivially.

.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
pacstrap \- install packages to the specified new root directory
.SH "SYNOPSIS"
.sp
pacstrap [options] root [packages\&...]
.SH "DESCRIPTION"
.sp
pacstrap is designed to create a new system installation from scratch\&. The specified packages will be installed into a given directory after setting up some basic mountpoints\&. By default, the host system\(cqs pacman signing keys and mirrorlist will be used to seed the chroot\&.
.sp
If no packages are specified to be installed, the \fIbase\fR group will be installed\&.
.SH "OPTIONS"
.PP
\fB\-C\fR <config>
.RS 4
Use an alternate config file for pacman\&.
.RE
.PP
\fB\-c\fR
.RS 4
Use the package cache on the host, rather than the target\&.
.RE
.PP
\fB\-G\fR
.RS 4
Avoid copying the host\(cqs pacman keyring to the target\&.
.RE
.PP
\fB\-i\fR
.RS 4
Prompt for package confirmation when needed (run interactively)\&.

image

@faho
Copy link
Member

faho commented Jun 6, 2020

Troff is just always worse than you thought.

We already detect "cq" in some capacity, but I'm guessing it's just just \cq?

@faho
Copy link
Member

faho commented Jun 6, 2020

Okay, deroff.py handles this, but generating the completion doesn't?

@faho
Copy link
Member

faho commented Jun 6, 2020

Huh, we have multiple parsers here? I didn't expect that. It's probably down to handling multiple "dialects", and this doesn't detect \(cq, possibly because of that weird awful no-good ( in there (seriously, groff is awful).

Anyway, let's just hack this in there, since we haven't had too many complaints, and man parsing is a bit of a dead end anyway.

@faho faho added the bug Something that's not working as intended label Jun 6, 2020
@faho faho closed this as completed in 0846fc8 Jun 6, 2020
@faho faho added this to the fish 3.2.0 milestone Jun 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants