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

Provide documentation on $PS1 customization #6

Open
mrolli opened this issue Mar 17, 2020 · 6 comments
Open

Provide documentation on $PS1 customization #6

mrolli opened this issue Mar 17, 2020 · 6 comments
Assignees
Labels
Sev: none Nice to have, no urgence, for the times when there is time Top: documentation Improvements or additions to documentations Typ: enhancement New functionality is needed. Something existing needs an enhancement.

Comments

@mrolli
Copy link
Contributor

mrolli commented Mar 17, 2020

Is your feature request related to a current shortcoming? Please describe.
The current default for $PS1 is ok, but there other possibilities

Describe the solution you'd like
Maybe we could provide a primer on $PS1 mangling on a new documentation page that is dedicated to setting up a cozy and sensible user environment that includes more things. The primer could show only the most important as a starting point, illustrate some basic recipes (copy/paste ready) and link to additional resources for the people that want to dive in.

Additional context
There is this id-inside thing that we never wrote an article for. Maybe this paragraph on $PS1 might be interessting for non-HPC users too?

@mrolli mrolli added Sev: none Nice to have, no urgence, for the times when there is time Top: documentation Improvements or additions to documentations Typ: enhancement New functionality is needed. Something existing needs an enhancement. labels Mar 17, 2020
@mrolli
Copy link
Contributor Author

mrolli commented Mar 17, 2020

@mand35
Copy link
Contributor

mand35 commented Mar 24, 2020

I would more recommend implementing an elaborated $PS1 for the users, thus they have nice features like colours, time and directories in it. We can document these changes and provide also links like the suggest.

@mrolli
Copy link
Contributor Author

mrolli commented Mar 24, 2020

$PS1 is something heavily influenced by personal taste. Finding THE right default is IMHO not feasible. We won't even manage to come to a common default within our office (complete dir paths or only last crumb? color scheme for dark or bright background? pastels versus bright colors? github information yes/no, which?). All a matter of taste and not worth the effort. Instead I'd rather stick to what it is now and empower the user to

  • either pick and copy/paste one of our example in the documentation
  • or show him web resources on how $PS1 works
  • and/or send ihm to something like the ezprompt.net above
  • or keep what it is now

@mand35
Copy link
Contributor

mand35 commented Mar 24, 2020

As far as I saw it, the default is just -bash-4.2$. Almost everything is better than this. There is almost no information in that prompt, and the provided information is almost useless. Sure user can modify by themselves, but why not providing something more elaborated as default. Thus the is a smaller need to modify it, less work for the users. Our users are researchers, most of the may not know these possibilities and may not want to deal with messing around with it. But I guess most of them will be happy about a more nice prompt, even if it is not THE right one for them. The other can still modify it.

We may want to discuss details with the whole office and agree to something. I tend for at least some color, machine name, and full path. Git branch and/or modification will anyways just be shown in git repos (conda does the same automatically with their envs). and time may also be nice.

@mrolli
Copy link
Contributor Author

mrolli commented Mar 24, 2020

This is the default IMHO, isn't it? At least it is for an unprivileged user sberger on submit01 that did not do anything in his .bashrc nor .bash_profile:

[sberger@submit01 .ssh]$

So, we have $USER, $HOST and basename $(pwd). More than useless I think - or did I miss something?

As it is a matter of taste, I'd rather put up like 10 sensible example and people that want more than the above jost copy/paste the respective $PS1 from the documentation to .bash_profile and at that very moment also learn something about .bashrc and .bash_profile files - common root causes of troubles.

@mrolli mrolli self-assigned this Aug 23, 2022
@mrolli
Copy link
Contributor Author

mrolli commented Aug 23, 2022

Include stuff like:

.bashrc
-- [ ] coloured $PS1
-- [ ] $PS1 with git info
-- [ ] $PS1 with last exit state info
-- [ ] elaborated squeue format (e.g. export SQUEUE_FORMAT="%.18i %.9p %.9P %.8j %.8u %.8T %.10M %.9l %.6D %R")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sev: none Nice to have, no urgence, for the times when there is time Top: documentation Improvements or additions to documentations Typ: enhancement New functionality is needed. Something existing needs an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants