Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Detect when we are running in screen #56

Open
jubianchi opened this issue Oct 6, 2015 · 8 comments
Open

Detect when we are running in screen #56

jubianchi opened this issue Oct 6, 2015 · 8 comments

Comments

@jubianchi
Copy link
Member

jubianchi commented Oct 6, 2015

I don't actually know if screen may cause similar bugs as tmux but perhaps it might be useful to check if we are running in it.

Just like we did for tmux with Console::isTmuxRunning I think we should introduce Console::isScreenRunning.

Even if adapting escape sequences is not required when we are in screen I think this method will still be useful for developers to know from their code if the users is inside a multiplexer.

See here for the original discussion: #53 (comment)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Jir4
Copy link

Jir4 commented Oct 7, 2015

Why not checking Console::isMultiplexerRunning ? I don't think implementing a method for each multiplexer is the good way to do that.

@Hywan
Copy link
Member

Hywan commented Oct 7, 2015

@Jir4 Correct but we have to deal with each multiplexer… So maybe we should go for Console::isMultiplexerRunning and Console::getMultiplexerName? That's a strange API too…

Thoughts?

@Hywan Hywan self-assigned this Oct 7, 2015
@Hywan Hywan changed the title Detecte when we are running in screen Detect when we are running in screen Oct 7, 2015
@Jir4
Copy link

Jir4 commented Oct 7, 2015

@Hywan Is it the name really important ? Does something change for each multiplexer ( when we copy for instance ) ?

I don't see all impacts of multiplexers on Hoa\Console

@jubianchi
Copy link
Member Author

@Jir4 @Hywan I would go for something like Console::isRunningInsideMultiplexer which would just be an helper method for developers using Hoa/Console:

public function isRunningInsideMultiplexer() {
    return static::isTmuxRunning() || static::isScreenRunning();
}

This would ease the use of this check but still allow us to do isolated internal checks.

@Jir4
Copy link

Jir4 commented Oct 7, 2015

👍

1 similar comment
@Hywan
Copy link
Member

Hywan commented Oct 13, 2015

👍

@Hywan
Copy link
Member

Hywan commented Oct 13, 2015

Do we agree that this is for private usages, while the visibility will be public I guess.

@Hywan Hywan added ready and removed in progress labels Nov 9, 2015
@Hywan
Copy link
Member

Hywan commented Feb 21, 2017

Any PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants