89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
10.17k stars 420 forks source link

[Suggestion] provide default prompt for fish shell #1571

Closed scarf005 closed 3 weeks ago

scarf005 commented 1 month ago

Is your feature request related to a problem? Please describe.

it's easy to distinguish you're inside a box on bash thanks to a custom prompt like 📦[scarf@fedora scarf]$:

https://github.com/89luca89/distrobox/blob/c05b6a43769bfa56d572a457f1420e0e2589fe3b/distrobox-init#L2028-L2031

however there isn't one for fish, making it hard to determine whether you're on host or box.

Describe the solution you'd like

provide default fish shell prompt inside distrobox.

Describe alternatives you've considered

provide guide on how to set up custom fish prompt that detects whether you're inside a box and shows prompt accordingly.

Additional context

i'm interested in opening a PR.

89luca89 commented 1 month ago

Thanks @scarf005 i'm open to contributions on this, I have no experience at all with fish shell

Boria138 commented 1 month ago

Thanks @scarf005 i'm open to contributions on this, I have no experience at all with fish shell

https://github.com/89luca89/distrobox/pull/1588

IPlayZed commented 1 month ago

I would suggest doing something like this, so only bash is to be dealt with. In theory you could also do this for any other shell.