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

Fix warnings in vterm_printf() and clear sh/bash shell functions in README.md #743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamescherti
Copy link
Contributor

@jamescherti jamescherti commented Nov 24, 2024

This pull request updates README.md:

  • Replaces clear with a POSIX-compliant function,
  • Fixes the ShellCheck warning SC2235 in vterm_printf() ("Use { ..; } instead of (..) to avoid subshell overhead")

    You appear to be using (..) to group test commands. This creates a subshell, making it unnecessarily slow. Avoid this by using { ..; } to group.
    Be careful to note that unlike (..), this requires both a space after the { and a semicolon before the }.
    For example, (cmd), (cmd;) and ( cmd ) are all valid, but {cmd}, {cmd;} and { cmd } are all syntax errors because they lack either or both of the spaces and semicolon. The correct form is { cmd; }

@jamescherti jamescherti force-pushed the fix-readme branch 2 times, most recently from 4f4a48b to 42affaf Compare November 24, 2024 19:59
@jamescherti jamescherti changed the title Fix vterm_printf() Shellcheck warning in the README.md file Fix vterm_printf() Shellcheck warning in README.md Nov 24, 2024
- `vterm_printf()`: Fix the ShellCheck warning SC2235:
  'Use { ..; } instead of (..) to avoid subshell overhead.'
  https://www.shellcheck.net/wiki/SC2235
- Replace `clear` with a POSIX-compliant function
@jamescherti jamescherti changed the title Fix vterm_printf() Shellcheck warning in README.md Fix warnings in vterm_printf() and clear shell functions in README.md Nov 24, 2024
@jamescherti jamescherti changed the title Fix warnings in vterm_printf() and clear shell functions in README.md Fix warnings in vterm_printf() and clear sh/bash shell functions in README.md Nov 24, 2024
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 this pull request may close these issues.

1 participant