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

Modify the prompt to show the currently running container. #120

Closed

Conversation

zerotri
Copy link
Contributor

@zerotri zerotri commented Apr 16, 2019

This modifies the prompt to show the currently running container, making it easy to identify which container instance you are working with in the case where you might have many. This would be one way to resolve #117.

This prefixes the diamond character with the container name to
very clearly distinguish the name from the rest of your prompt.

Where previously a bash prompt might read
🔹[zerotri@toolbox toolbox]$

for the container sysutils it would now read

sysutils🔹[zerotri@toolbox toolbox]$

EDIT: This would also potentially help resolve the problem defined in #98.

…ing it easy to identify which container instance you are working with in the case where you might have many.

This prefixes the diamond character with the container name to
very clearly distinguish the name from the rest of your prompt.

Where previously a bash prompt might read
🔹[zerotri@toolbox toolbox]$

for the container `sysutils` it would now read

sysutils🔹[zerotri@toolbox toolbox]$
@Frederik-Baetens
Copy link

This is a nice solution, but why not also add the container name to the hostname? That gives the user more flexibility.

@bexelbie
Copy link

What would do we need to do to revive this PR? This is something I was about to propose.

@Frederik-Baetens
Copy link

I read that toolbox will be rewritten in Go, so the current code is probably low priority

Jmennius added a commit to Jmennius/toolbox that referenced this pull request Feb 29, 2020
..to distinguish different toolboxes more easily inside a toolbox.
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Signed-off-by: Ievgen Popovych <[email protected]>
Jmennius added a commit to Jmennius/toolbox that referenced this pull request Feb 29, 2020
..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Signed-off-by: Ievgen Popovych <[email protected]>
Jmennius added a commit to Jmennius/toolbox that referenced this pull request Feb 29, 2020
..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Signed-off-by: Ievgen Popovych <[email protected]>
@HarryMichal
Copy link
Member

HarryMichal commented Mar 13, 2020

Hi, we never went ahead and merged this PR. We didn't mean to ignore you (even though we did). Sadly the code here is outdated so I'll close this PR.

But I personally like the idea quite a lot. It certainly looks better than just having 'toolbox' as the hostname. The solution proposed by @Jmennius looks nice, so I'll take a look at it and try to incorporate it into the rewritten Toolbox.

But still big thank you for proposing the change!

Jmennius added a commit to Jmennius/toolbox that referenced this pull request May 24, 2022
..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Jmennius added a commit to Jmennius/toolbox that referenced this pull request May 24, 2022
..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Signed-off-by: Ievgen Popovych <[email protected]>
@debarshiray
Copy link
Member

Yes, this change is a bit too outdated at this point, and not just because of the rewrite in Go. Soon after this pull request was filed, we stopped setting the shell's prompt this way.

See all the issues and pull requests linked from #969 for all the latest discussions around this topic.

Regardless, thanks for your interest in Toolbx!

@debarshiray
Copy link
Member

See all the issues and pull requests linked from #969 for all the latest
discussions around this topic.

Actually, #98 is more relevant to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way to identify container
5 participants