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

Escape backticks #304

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Escape backticks #304

merged 2 commits into from
Mar 28, 2024

Conversation

nephros
Copy link
Collaborator

@nephros nephros commented Mar 28, 2024

The commands between them are actually evaluated, leading to lots of confusing help output in the log file.

nephros added 2 commits March 28, 2024 19:24
The commands between them are actually evaluated, leading to lots of
confusing help output in the log file.
@nephros
Copy link
Collaborator Author

nephros commented Mar 28, 2024

Note that the behaviour is different depending on whether backticks appear between single or double quotes.

L75 is fine, log snippet:

2024-03-28T18:52:04+01:00 [Debug] "storeman" entries from `ssu lr`:

L146 and friends are not, they are expanded to pkcon help output:

2024-03-28T18:52:13+01:00 [Warning] Failed to refresh harbour-storeman-obs repository, because error-code 7 was returned by: pkcon -pv repo-set-data harbour-storeman-obs refresh-now true
2024-03-28T18:52:13+01:00 [Notice] Trying to terminate (i.e., sending SIGTERM to) all processes named (ID) Usage:
  pkcon [OPTION?] PackageKit Console Program

PackageKit Console Interface

Subcommands:
  backend-details
  get-roles
  get-groups
  get-filters
  get-transactions
  get-time
  search [name|details|group|file] [data]
  install [packages]
  install-local [files]
  download [directory] [packages]
[...]

Copy link
Member

@Olf0 Olf0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thank you very much!

Obviously I have not take a close look at the logfile for long and I regularly fail to immediately comprehend what the backticks do in shell scripts, because I do not like this ancient syntax and always use $() since the 1990s.

@Olf0
Copy link
Member

Olf0 commented Mar 28, 2024

Note that the behaviour is different depending on whether backticks appear between single or double quotes.

Yes, sure, that is what the "modern" syntax ($()) makes obvious so nicely, because most have the simplified rule in mind: Nothing is evaluated between double-quotes, except for $ followed by something, but in fact a sequence of two backticks also are.
With single quotes really nothing is evaluated between them.

@Olf0 Olf0 merged commit 83ed518 into devel Mar 28, 2024
1 check passed
@Olf0 Olf0 deleted the backticks branch March 28, 2024 22:38
Olf0 added a commit to sailfishos-chum/sailfishos-chum-gui-installer that referenced this pull request Mar 28, 2024
@Olf0
Copy link
Member

Olf0 commented Mar 28, 2024

Also applied to sailfishos-chum-gui-installer, see sailfishos-chum/sailfishos-chum-gui-installer#36

Olf0 added a commit to sailfishos-chum/sailfishos-chum-gui-installer that referenced this pull request Mar 28, 2024
Olf0 added a commit that referenced this pull request Mar 29, 2024
* [harbour-storeman-installer.spec] Post release version increase

* [cache-docker-images_github-ci.md] Add better analysis of Docker Cache and Rootless Docker

* [cache-docker-images_github-ci.md] Make time-relavive statement (yesterday) absolute (2023-01-07)

* [cache-docker-images_github-ci.md] Fix formatting

* [cache-docker-images_github-ci.md] More details WRT `cached-dependencies `

* Update cache-docker-images_github-ci.md

* [cache-docker-images_github-ci.md] Fix typos etc.

* [cache-docker-images_github-ci.md] Add issue severity statement

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* [build.yml] Introduce recent beautification from Storeman

* [README.md] Not offered at SailfishOS:Chum any longer

* [README.md] Rectify statement logically

* Update README.md

* Escape backticks (#304)

* Escape backticks
  The commands between them are actually evaluated, leading to lots of
confusing help output in the log file.

* Revert change on one line

---------

Co-authored-by: nephros <nemo@geminipda>

* No comma after "i.e." and "e.g." in British English (#305)

* [double-fork-in-shell.md] No comma after "i.e." and "e.g." in BE

* [cache-docker-images_github-ci.md] No comma after "i.e." and "e.g." in BE

* [rpm/harbour-storeman-installer.rpmlintrc] No comma after "i.e." in BE

* [.github/workflows/build.yml] No comma after "i.e." in BE

* [rpm/harbour-storeman-installer.spec] No comma after "i.e." and "e.g." in BE

* [bin/harbour-storeman-installer] No comma after "i.e." and "e.g." in BE

* [LICENSE] Update contributors

* [LICENSE] Add mail addresses of contributors

* [build.yml] Improve wording of title

---------

Co-authored-by: Peter G <[email protected]>
Co-authored-by: nephros <nemo@geminipda>
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.

2 participants