New Section: batchsys (Job Scheduler Info) #705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds functionality to show the job ID of a batch submission engine (/job scheduler) to the prompt. The job ID is gathered from environment variables, so there is little to no overhead being generated.
I am running many jobs on large HPC machines and need this information frequently when interacting with the session on the compute nodes. With displaying this information, one also directly sees that there still is an allocation available within which you are currently working – something not all schedulers/prompts show directly.
Since the job ID is displayed, the icon for that is obviously an (emoji) briefcase. It can be changed per user variables. Also changed can be prefix, suffix, and color – via the usual environment variables.
I do not know if
batchsys
needs to be added to the default prompt for every user; but without adding it to$SPACESHIP_PROMPT_ORDER
inspaceship.zsh
thebatchsys.zsh
won't be found. So it appears it must? I don't think it is too much of a problem since the environment variable parsing should be fairly quick.NPM tests pass successfully:
Screenshot