Skip to content

systemd-run: update page #9911

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

Merged
merged 6 commits into from
Apr 21, 2023
Merged

systemd-run: update page #9911

merged 6 commits into from
Apr 21, 2023

Conversation

metiulekm
Copy link
Contributor

@metiulekm metiulekm commented Mar 3, 2023

  • The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.
  • The page(s) have at most 8 examples.
  • The page description(s) have links to documentation or a homepage.
  • The page(s) follow the content guidelines.
  • The PR title conforms to the recommended templates.
  • Version of the command being documented (if known): systemd 253 (253-1-arch)

systemd-run is very versatile and it can basically do anything that can be done using the usual file-based configuration (with the obvious limitation of everything disappearing after a reboot), so I have documented the things I found the most useful personally.

@github-actions github-actions bot added the new command Issues requesting creation of a new page or PRs adding a new page for a command. label Mar 3, 2023
@CLAassistant
Copy link

CLAassistant commented Mar 3, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

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

Welcome to tldr, Thanks for your contribution. I have some suggestions for this page.


- Provide a custom (u)nit name and pass extra parameters:

`systemd-run -u {{unit_name}} -- {{executable}} {{extra parameters ...}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`systemd-run -u {{unit_name}} -- {{executable}} {{extra parameters ...}}`
`systemd-run -u {{unit_name}} -- {{executable}} {{extra_parameters ...}}`

I am not 100% sure about this, would this be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used the current version because CONTRIBUTING.md has {{path/to/directory1 path/to/directory2 ...}} as an example, and there can be multiple parameters. What do you think about this?

Copy link
Contributor

@EmilyGraceSeville7cf EmilyGraceSeville7cf Mar 4, 2023

Choose a reason for hiding this comment

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

I am not 100% sure about this, would this be better?

According to yours style guide it's incorrect, ellipsis always contain two items, and not one before .... The original code was more right, but not completely. Solutions: {{arg1 arg2 ...}}, {{argument1 argument2 ...}}.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to {{argument1 argument2 ...}}.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to {{argument1 argument2 ...}}.

Yeah, seems better

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Copy link
Contributor Author

@metiulekm metiulekm left a comment

Choose a reason for hiding this comment

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

Thank you so much! 😸


- Provide a custom (u)nit name and pass extra parameters:

`systemd-run -u {{unit_name}} -- {{executable}} {{extra parameters ...}}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used the current version because CONTRIBUTING.md has {{path/to/directory1 path/to/directory2 ...}} as an example, and there can be multiple parameters. What do you think about this?


- Provide a custom (u)nit name and pass extra parameters:

`systemd-run -u {{unit_name}} -- {{executable}} {{extra parameters ...}}`
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to {{argument1 argument2 ...}}.

metiulekm and others added 2 commits March 5, 2023 09:07
Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
Copy link
Contributor Author

@metiulekm metiulekm left a comment

Choose a reason for hiding this comment

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

Thanks a lot @EmilySeville7cfg and @blueskyson!

@EmilyGraceSeville7cf
Copy link
Contributor

EmilyGraceSeville7cf commented Mar 5, 2023

@EmilySeville7cfg, I have no idea what that means stuck_out_tongue So, what should I do?

Style guide contains this phrase:

For any reference to paths of files or directories, use the format {{path/to/}}, except when the location is implicit.

My original suggestion was to change placeholder to {{path/to/executable}}/{{path/to/executable_file}}. But on the other hand, there is such note: when the location is implicit (to avoid confusion it should be strictly defined). It's not clear what is implicit here. If it means that location is determined from $PATH, then you can leave placeholder as it is.

P.S. Here is another issue with it: what if location can be both implicit (like I defined this term) and explicit? It's undefined what to write here. Possible solution: change sentence to:

For any reference to paths of files or directories, use the format {{path/to/}}, except when the location can be implicit.

But then we lose an ability to present just implicit paths. Besides, completely another way can be chosen: don't care about implicit locations at all and assume that any path/to/* placeholder can represent implicit location.

@metiulekm
Copy link
Contributor Author

P.S. Here is another issue with it: what if location can be both implicit (like I defined this term) and explicit? It's undefined what to write here.

If I understand correctly what you mean, this is exactly the case, as both let's say systemd-run whoami and systemd-run /usr/bin/whoami will work. The same is also true for the other tools I mentioned (gdb and which).

So in the end, what should I do? @kbdharun and @blueskyson 👍'd keeping {{executable}} as is, but I am in no way opposed to changing it to {{path/to/executable}}.

@github-actions
Copy link

Hi all! This thread has not had any recent activity.
Are there any updates? Thanks!

@github-actions github-actions bot added the waiting Issues/PRs with Pending response by the author. label Mar 22, 2023
@github-actions
Copy link

Hi everyone.
This thread is being closed as there was no response to the previous prompt.
However, please leave a comment whenever you're ready to resume, so the thread can be reopened.
Thanks again!

@github-actions github-actions bot closed this Apr 21, 2023
@kbdharun kbdharun reopened this Apr 21, 2023
@github-actions github-actions bot removed the waiting Issues/PRs with Pending response by the author. label Apr 21, 2023
@kbdharun kbdharun changed the title systemd-run: add page systemd-run: update page Apr 21, 2023
@github-actions github-actions bot added the page edit Changes to an existing page(s). label Apr 21, 2023
@tldr-bot

This comment was marked as outdated.

@kbdharun kbdharun merged commit bfa1571 into tldr-pages:main Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Issues requesting creation of a new page or PRs adding a new page for a command. page edit Changes to an existing page(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants