-
Notifications
You must be signed in to change notification settings - Fork 569
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
docs: non-ASCII hyphens in commands - copy pasting them fails on command line #5903
Comments
This is due to the fact that some "-" characters are not escaped with a backslash. |
@danielkrajnik When doing the 4 steps to reproduce (in my preferred xfce4-terminal) it actually works fine for me: $ ls /run/user/$UID/gnupg
S.dirmngr S.gpg-agent S.gpg-agent.browser S.gpg-agent.extra S.gpg-agent.ssh Perhaps it's dependent on the terminal-emulator? Have you tried a different one than what you normally use yet? |
Strange, it is working for me now as well even though it's the same terminal (alacritty). Maybe switching from Wayland to X11? Or maybe something else changed since July. |
The format might be wrong, but how do you explain it sometimes works and sometimes it doesn't? Or in other words, do you have an actionable thing in mind by which we could fix this?
That's what I'm seeing as well. Not that I can explain the difference... |
#5903 (comment) proper escaping with a backslash. |
That's already the case: firejail/src/man/firejail.1.in Line 3116 in 72edd96
|
I've just tried logging out of X11 and logging back into Wayland and it still worked (hyphens were again correctly copied as hex |
I can confirm that this was a problem when the issue was opened, though I can't I also had attempted a regex to fix this, but I didn't finish it. This is what I had written (the examples are current):
GNU man ("man-db" package on Arch Linux) converts $ git grep -E 'writable\\?-run\\?-user' -- src/man/firejail.1.in
src/man/firejail.1.in:\fB\-\-writable-run-user
src/man/firejail.1.in:$ sudo firejail --writable-run-user Most/all options are unfortunately also half-escaped: $ git grep ' \\-\\-[^ ]*-' -- src/man/firejail.1.in | head
src/man/firejail.1.in:firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-debug-syscalls32 | \-\-debug-protocols | \-\-help | \-\-version}
src/man/firejail.1.in:$ firejail \-\-dbus-system=none
src/man/firejail.1.in:$ firejail \-\-dbus-user=none
src/man/firejail.1.in:$ firejail \-\-debug-blacklists firefox
src/man/firejail.1.in:$ firejail \-\-debug-caps
src/man/firejail.1.in:$ firejail \-\-debug-errnos
src/man/firejail.1.in:$ firejail \-\-debug-protocols
src/man/firejail.1.in:$ firejail \-\-debug-syscalls
src/man/firejail.1.in:$ firejail \-\-debug-whitelists firefox
src/man/firejail.1.in:$ firejail \-\-disable-mnt firefox Note that mandoc does not convert them, so this seems to be a GNU-specific |
Here I can see
The first two are properly escaped, so that they appear correctly in the man page. The other two are not escaped, so that they appear as U+2010 HYPHEN in the man page. This confirms the issue. |
This actually comes from a recent change in |
Remove extranous escape characters and fix bold escaping. Command used to check for unusual escape sequences: $ git grep -E '\\[^ "\f-]|\\f[^BR]' -- src/man/*.in With this, the only escape sequences used are: $ git grep -E -ho -e '\\-' -e '\\[^-][^ ]?' -- src/man/*.in | LC_ALL=C sort | uniq -c 9 \" 1 \&. 1194 \- 23 \\ 507 \fB 127 \fR Related commits: * 1379851 ("Baseline firejail 0.9.28", 2015-08-08) * 1684c9e ("Fixes for man firejail (netblue30#2628)", 2019-03-29) * 7352501 ("Clarify that file globbing occurs only at start", 2020-04-11) / PR netblue30#3347 * f54ee53 ("man text for --include command", 2021-03-05). This is a follow-up to netblue30#6472. Kind of relates to netblue30#5903.
Remove extranous escape characters and fix bold escaping. Command used to check for unusual escape sequences: $ git grep -E -e '\\f[^BR]' -e '\\[^ "\f-]' -- src/man/*.in With this, the only escape sequences used are: $ git grep -E -ho -e '\\-' -e '\\[^-][^ ]?' -- src/man/*.in | LC_ALL=C sort | uniq -c 9 \" 1 \&. 1194 \- 23 \\ 507 \fB 127 \fR Related commits: * 1379851 ("Baseline firejail 0.9.28", 2015-08-08) * 1684c9e ("Fixes for man firejail (netblue30#2628)", 2019-03-29) * 7352501 ("Clarify that file globbing occurs only at start", 2020-04-11) / PR netblue30#3347 * f54ee53 ("man text for --include command", 2021-03-05). This is a follow-up to netblue30#6472. Kind of relates to netblue30#5903.
Remove extranous escape characters and fix bold escaping. Command used to check for unusual escape sequences: $ git grep -E -e '\\f[^BR]' -e '\\[^ "\f-]' -- src/man/*.in With this, the only escape sequences used are: $ git grep -E -ho -e '\\-' -e '\\[^-][^ ]?' -- src/man/*.in | LC_ALL=C sort | uniq -c 9 \" 1 \&. 1194 \- 23 \\ 507 \fB 127 \fR Related commits: * 1379851 ("Baseline firejail 0.9.28", 2015-08-08) * 1684c9e ("Fixes for man firejail (#2628)", 2019-03-29) * 7352501 ("Clarify that file globbing occurs only at start", 2020-04-11) / PR #3347 * f54ee53 ("man text for --include command", 2021-03-05). This is a follow-up to #6472. Kind of relates to #5903.
Description
Copying flags from man pages doesn't work - hyphens are encoded as
e280 90
instead2d
.They will look the same, but firejail will error (for example):
Steps to Reproduce
man firejail
/ --writable‐run‐user
firejail --writable‐run‐user
*5. paste it into a hex editor:
Expected Behaviour
enter shell in firejail with
/run/user/$UID/gnupg
availableActual Behaviour
Error: invalid --writable‐run‐user command line option
Environment
Checklist
/usr/bin/vlc
) "fixes" it).https://github.com/netblue30/firejail/issues/1139
)browser-allow-drm yes
/browser-disable-u2f no
infirejail.config
to allow DRM/U2F in browsers.--profile=PROFILENAME
to set the right profile. (Only relevant for AppImages)The text was updated successfully, but these errors were encountered: