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
Add Screen session section to prompt #1062
Conversation
✅ Deploy Preview for spaceship-prompt ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
c6be0b6
to
c844fa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your section looks good. This is a good feature.
At the moment we have frozen adding new features until the work on #1056 is in progress. ETA is a few weeks.
c844fa7
to
1cdb3f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I've taken care of this PR and refactored it to the latest master.
It's now renamed screen
-> gnu_screen
to make name more specific.
Thanks for contributing! |
# [4.10.0](v4.9.1...v4.10.0) (2022-11-10) ### Bug Fixes * **java:** Added support gradle kotlin dsl ([#1289](#1289)) ([5b186d6](5b186d6)) * **java:** detect empty java version ([178ffc9](178ffc9)) * **sudo:** Sudo should be hidden by default ([36a5852](36a5852)) * **upsearch:** find complains about -name. Fix [#1286](#1286) ([5e8b7c0](5e8b7c0)) * **upsearch:** Prevent globs from expanding to early ([b10e093](b10e093)) ### Features * **gnu_screen:** Add Screen session section to prompt ([#1062](#1062)) ([f996381](f996381)) * **sudo:** Add sudo section ([49ce387](49ce387)) * **vlang:** Add V Section ([#877](#877)) ([9399e09](9399e09))
🎉 This PR is included in version 4.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.
https://www.gnu.org/software/screen/
There is a similar PR open for this functionality (#906) but I think that PR hasn't enough information in bash script definition neither into documentation. It also hasn't enough customization.
For that reasons I open this PR in order to improve this project.
Screen defines a
$STY
env var with formatpid.tty.host
orpid.sessionname
(if defined). So prompt information is shown only when a session is opened. That check is defined using a regex match/^[0-9]+/
against$STY
env var. If$STY
is empty or it doesn't match regex section returns before definelocal 'screen_session'
.But if you don't want to show session name you can disable it using
SPACESHIP_SCREEN_SHOW_SESSION=false
.Screenshot
Using
SPACESHIP_SCREEN_SHOW_SESSION=false