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

[Bug] less throw error no +quit-if-one-screen option when displaying Unit #22

Closed
1 of 4 tasks
landure opened this issue Jan 23, 2025 · 8 comments · Fixed by #28
Closed
1 of 4 tasks

[Bug] less throw error no +quit-if-one-screen option when displaying Unit #22

landure opened this issue Jan 23, 2025 · 8 comments · Fixed by #28

Comments

@landure
Copy link

landure commented Jan 23, 2025

Describe the bug

When using return key on a line in Unit list, this error appears:

There is no +quit-if-one-screen option ("less --help" for help)
Press RETURN to continue

To Reproduce

Steps to reproduce the behavior:

  1. Run isd with:
    nix run github:isd-project/isd
  2. Select a Unit in unit list
  3. Press return

Environment

  1. Distribution: Use the output from cat /etc/os-release:
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
  1. isd version: Open isd, open the command palette and run Show the version
0.2.0
  1. Provide the systemd version via systemctl --version
systemd 255 (255.4-1ubuntu8.4)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4
 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
  1. Provide the used installation method
  • AppImage
  • nix
  • uv
  • Other
Copy link

welcome bot commented Jan 23, 2025

Thanks for opening your first issue here! 💖

@isd-project
Copy link
Owner

isd-project commented Jan 23, 2025

Weird. Which less version are you using (less --version)?
What happens if you run echo 1 | less? Does the pager remain open or does it "auto-close" the output?

EDIT: Can you confirm that the following opens the output in the pager without outclosing the output?
echo 1 | less -F -+F

@landure
Copy link
Author

landure commented Jan 23, 2025

Less version:

❯ less --version
less 590 (GNU regular expressions)
Copyright (C) 1984-2021  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less

echo 1 | less works without issue. The pager remain open.

Image

echo 1 | less -F -+F doesn't close the output:

Image

In my opinion, less should be a dependency of the flake. The flake shouldn't depend on the OS less.
You might also want to make sure that the less command isn't a shell alias (it's not the case here, but…).

@isd-project
Copy link
Owner

Ok, there was an issue with less and resetting long command-line options.
It will be fixed in the next release. 👍

Thank you for reporting!

In my opinion, less should be a dependency of the flake. The flake shouldn't depend on the OS less.

I have thought about it but it doesn't fit into the design. This tool will not enforce a specific pager/editor and bloat the dependencies by default. I might consider overlays or "validated" packages within the flake to guarantee working defaults but then how should editors be handled that need additional overlays?

But if you don't use less you shouldn't be required to install it.

You might also want to make sure that the less command isn't a shell alias (it's not the case here, but…).

Good point! I will investigate this

@landure
Copy link
Author

landure commented Jan 23, 2025

If you don't want to enforce a specific pager or editor, you might want to rely on $PAGER and $EDITOR environment variables.
You might also want a "safe" default such as less and nano in case of custom pager or editor failure.

In any case, thank you for your work. isd is a very nice tool.

@isd-project
Copy link
Owner

isd-project commented Jan 23, 2025

It does rely on those variables 🤔
Is this not working for you? Then it definitely is a bug!

See: https://isd-project.github.io/isd/customization/#default-pager

@landure
Copy link
Author

landure commented Jan 23, 2025

sorry, didn't read the doc yet. The bug occurred directly at first run :D.

@isd-project
Copy link
Owner

No worries! Thank you for reporting the issue with less 👍

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

Successfully merging a pull request may close this issue.

2 participants