← Back
Mischa Vandenburg March 23, 2024 20m

Switching to Starship for my Bash Prompt

Read full transcript 14 segments
  1. someone in my school Community asked a someone in my school Community asked a question about my git prompt and I've question about my git prompt and I've question about my git prompt and I've been also been getting questions about been also been getting questions about been also been getting questions about this in my DOT files repo and it does this in my DOT files repo and it does this in my DOT files repo and it does seem to be yeah a bit of an issue with seem to be yeah a bit of an issue with seem to be yeah a bit of an issue with people they can't get it to work or it's people they can't get it to work or it's people they can't get it to work or it's giving them problems and then Rio here giving them problems and then Rio here giving them problems and then Rio here he came with the suggestion of using he came with the suggestion of using he came with the suggestion of using Starship so I've never used that before Starship so I've never used that before Starship so I've never used that before it's completely new to me but it looks it's completely new to me but it looks it's completely new to me but it looks very interesting and I I figured I would very interesting and I I figured I would very interesting and I I figured I would give that a shot because when I moved give that a shot because when I moved give that a shot because when I moved from zshell to from zshell to from zshell to bash just increase the font size here bash just increase the font size here bash just increase the font size here when I move from zshell to bash I also when I move from zshell to bash I also when I move from zshell to bash I also very I did some work on my prompt and I very I did some work on my prompt and I very I did some work on my prompt and I did it so that my I wanted to have a did it so that my I wanted to have a did it so that my I wanted to have a very clean configuration right I I I you very clean configuration right I I I you very clean configuration right I I I you have this what was it power power shell have this what was it power power shell have this what was it power power shell 10K power level 10K that's 10K power level 10K that's 10K power level 10K that's that's what I was using in zshell and I that's what I was using in zshell and I that's what I was using in zshell and I think most people do and I had this this think most people do and I had this this think most people do and I had this this sort of thing going on with all of the sort of thing going on with all of the sort of thing going on with all of the icons and colors but actually I think icons and colors but actually I think icons and colors but actually I think that's very distracting even I I didn't that's very distracting even I I didn't that's very distracting even I I didn't like I did it because it looked cool but like I did it because it looked cool but like I did it because it looked cool but eventually it was very distracting and eventually it was very distracting and eventually it was very distracting and very noisy visually so when I switched very noisy visually so when I switched very noisy visually so when I switched to bash I just went with a very minimal to bash I just went with a very minimal to bash I just went with a very minimal prompt and if I'm just in my home prompt and if I'm just in my home prompt and if I'm just in my home directory it just looks like this very directory it just looks like this very directory it just looks like this very clean nice colors but the thing is that clean nice colors but the thing is that clean nice colors but the thing is that I I do want to have this functionality

  2. I I do want to have this functionality I I do want to have this functionality when I'm in a a git repo it will show me when I'm in a a git repo it will show me when I'm in a a git repo it will show me the branch that I'm on and if there is the branch that I'm on and if there is the branch that I'm on and if there is something changing so like now there are something changing so like now there are something changing so like now there are a few changes here so I have this uh a few changes here so I have this uh a few changes here so I have this uh star here so if I do get div let's check star here so if I do get div let's check star here so if I do get div let's check out what I've actually out what I've actually out what I've actually changed okay uh sure so let's just changed okay uh sure so let's just changed okay uh sure so let's just commit that commit that commit that quick um quick um quick um dat um font size what was it dat um font size what was it dat um font size what was it okay and okay and okay and now my my git status is clean but you now my my git status is clean but you now my my git status is clean but you see also here on the branch uh that see also here on the branch uh that see also here on the branch uh that there is no indication of any changes there is no indication of any changes there is no indication of any changes anymore so that's that's the main anymore so that's that's the main anymore so that's that's the main functionality that I want I wanted to functionality that I want I wanted to functionality that I want I wanted to have it clean and minimal and I want to have it clean and minimal and I want to have it clean and minimal and I want to be able to see the branches what I'm on be able to see the branches what I'm on be able to see the branches what I'm on and if there are any changes and it and if there are any changes and it and if there are any changes and it seems like Starship also has that right seems like Starship also has that right seems like Starship also has that right it has this it has this it has this uh you can get some very very elaborate uh you can get some very very elaborate uh you can get some very very elaborate prompt going on let's see is it here prompt going on let's see is it here prompt going on let's see is it here yeah this kind of stuff you can you can yeah this kind of stuff you can you can yeah this kind of stuff you can you can get that but you can also do what is it get that but you can also do what is it get that but you can also do what is it plain text yeah this looks pretty plain text yeah this looks pretty plain text yeah this looks pretty clean no icons what is it pure promt clean no icons what is it pure promt clean no icons what is it pure promt yeah this looks pretty clean so yeah I yeah this looks pretty clean so yeah I yeah this looks pretty clean so yeah I want to try it out cuz yeah I I'm I only want to try it out cuz yeah I I'm I only want to try it out cuz yeah I I'm I only use bash uh and that's probably the only use bash uh and that's probably the only use bash uh and that's probably the only shell I'm going to be using but I do shell I'm going to be using but I do shell I'm going to be using but I do think it's pretty cool that it's a cross think it's pretty cool that it's a cross think it's pretty cool that it's a cross shell prompt so that it's portable and shell prompt so that it's portable and shell prompt so that it's portable and it will be easier to install as long as

  3. it will be easier to install as long as it will be easier to install as long as I have Brew I can use this it seems so I have Brew I can use this it seems so I have Brew I can use this it seems so um yeah I'm just going to give this a um yeah I'm just going to give this a um yeah I'm just going to give this a go um because yeah to show it like in my go um because yeah to show it like in my go um because yeah to show it like in my like to get this git Branch setup I was like to get this git Branch setup I was like to get this git Branch setup I was using the using the using the um this G prompt sh so this is an a um this G prompt sh so this is an a um this G prompt sh so this is an a shell file that is actually shell file that is actually shell file that is actually provided by GitHub but then on when I provided by GitHub but then on when I provided by GitHub but then on when I install it with Brew it works install it with Brew it works install it with Brew it works differently than when I install it on a differently than when I install it on a differently than when I install it on a Linux machine so yeah it's a bit messy Linux machine so yeah it's a bit messy Linux machine so yeah it's a bit messy like this this whole this whole stuff is like this this whole this whole stuff is like this this whole this whole stuff is rather messy I have to set these rather messy I have to set these rather messy I have to set these environment variables it's not working environment variables it's not working environment variables it's not working properly so I think it's going to be a properly so I think it's going to be a properly so I think it's going to be a lot cleaner if I just move it to to um lot cleaner if I just move it to to um lot cleaner if I just move it to to um Starship so that's what I'm going to do Starship so that's what I'm going to do Starship so that's what I'm going to do today and uh let's just uh install it today and uh let's just uh install it today and uh let's just uh install it right let's get going so install the right let's get going so install the right let's get going so install the latest version for a system you just latest version for a system you just latest version for a system you just curl this um Mac OS is probably Brew curl this um Mac OS is probably Brew curl this um Mac OS is probably Brew right right right um can't I just yeah Home Brew brew um can't I just yeah Home Brew brew um can't I just yeah Home Brew brew install Starship let's try install Starship let's try install Starship let's try that so BR install Starship and install it and then while Starship and install it and then while that's installing set up your your shell that's installing set up your your shell that's installing set up your your shell to use to use to use Starship add the following to the end of Starship add the following to the end of Starship add the following to the end of your Basher SE so it should be that

  4. simple okay simple okay so then I'm going to go to my so then I'm going to go to my so then I'm going to go to my bashery it says you have to end it add bashery it says you have to end it add bashery it says you have to end it add it in the end but I have this prompt it in the end but I have this prompt it in the end but I have this prompt section section section here and I'll just try to to why isn't it why isn't it why isn't it copying copying copying copy oh let me turn on my keys as well copy oh let me turn on my keys as well copy oh let me turn on my keys as well while I'm at it start while I'm at it start while I'm at it start casting and casting and casting and here here we go so I it says to put it here here we go so I it says to put it here here we go so I it says to put it in the end but I'm U going to be a bit in the end but I'm U going to be a bit in the end but I'm U going to be a bit rebellious and just going to try it like rebellious and just going to try it like rebellious and just going to try it like this so I have the this so I have the this so I have the prompt and there prompt and there prompt and there is uh PS1 somewhere probably oh well that is not even active probably oh well that is not even active anymore either okay you know what just anymore either okay you know what just anymore either okay you know what just going to delete that for going to delete that for going to delete that for now okay um so that's the only stuff now okay um so that's the only stuff now okay um so that's the only stuff that is related to prompt apparently yeah okay so I just remove apparently yeah okay so I just remove that stuff and I've added this in my b that stuff and I've added this in my b that stuff and I've added this in my b or see it says to put it in the end but or see it says to put it in the end but or see it says to put it in the end but I'm going to try to put it put it here I'm going to try to put it put it here I'm going to try to put it put it here and let's try it out so this is still my and let's try it out so this is still my and let's try it out so this is still my old bash shell I can keep this open for old bash shell I can keep this open for old bash shell I can keep this open for now I'm just going to create a new now I'm just going to create a new now I'm just going to create a new [Music] [Music] [Music] one okay it works

  5. one okay it works one okay it works already that's pretty already that's pretty already that's pretty cool and it is outputting commands it cool and it is outputting commands it cool and it is outputting commands it seems so I'm now in my home seems so I'm now in my home seems so I'm now in my home directory it looks pretty clean and directory it looks pretty clean and directory it looks pretty clean and minimal it's showing my prompt here minimal it's showing my prompt here minimal it's showing my prompt here that's cool let's go to a DOT to a g that's cool let's go to a DOT to a g that's cool let's go to a DOT to a g repo wow okay that looks pretty cool dot repo wow okay that looks pretty cool dot repo wow okay that looks pretty cool dot files on files on files on Main Main Main via what would that via what would that via what would that mean V5 46 I have no idea what that mean V5 46 I have no idea what that mean V5 46 I have no idea what that means I have no versioning or anything means I have no versioning or anything means I have no versioning or anything like that in my in my like that in my in my like that in my in my uh repo but yeah it looks pretty good uh repo but yeah it looks pretty good uh repo but yeah it looks pretty good and now it's it's not doing this took 5 and now it's it's not doing this took 5 and now it's it's not doing this took 5 seconds so that's good uh let's check seconds so that's good uh let's check seconds so that's good uh let's check out another repo home out another repo home out another repo home lab I'm just on my home lab on lab I'm just on my home lab on lab I'm just on my home lab on Main yeah this looks pretty good get status do status do swap um what is that about I have no swap um what is that about I have no swap um what is that about I have no idea well I in my DOT files now so let's idea well I in my DOT files now so let's idea well I in my DOT files now so let's check out what it will do if I just check out what it will do if I just check out what it will do if I just Commit This so the changes I've made is Commit This so the changes I've made is Commit This so the changes I've made is that I have removed that commented thing that I have removed that commented thing that I have removed that commented thing and now I have this Starship in it bash and now I have this Starship in it bash and now I have this Starship in it bash in my Basher C so let's just try in my Basher C so let's just try in my Basher C so let's just try that um switch to Starship in

  6. that um switch to Starship in that um switch to Starship in bashery push bashery push bashery push that and now what does this look like so that and now what does this look like so that and now what does this look like so the difference is okay we have the difference is okay we have the difference is okay we have this this is now gone so now it means this this is now gone so now it means this this is now gone so now it means that I'm on a normal that I'm on a normal that I'm on a normal um like an upto-date Branch um like an upto-date Branch um like an upto-date Branch right it's not saying this it it's right it's not saying this it it's right it's not saying this it it's pretty cool that it's actually showing pretty cool that it's actually showing pretty cool that it's actually showing me this um how long it took that's me this um how long it took that's me this um how long it took that's interesting and but I have no idea what interesting and but I have no idea what interesting and but I have no idea what this main via means via version this main via means via version this main via means via version 546 let's check out if I can figure that 546 let's check out if I can figure that 546 let's check out if I can figure that out out out because I think this is already looking because I think this is already looking because I think this is already looking pretty good it's a bit more noisy than pretty good it's a bit more noisy than pretty good it's a bit more noisy than what I had before but if I'm just in my what I had before but if I'm just in my what I had before but if I'm just in my home home home directory looks pretty clean it is directory looks pretty clean it is directory looks pretty clean it is showing my showing my showing my insert uh uh prompt here and if I go insert uh uh prompt here and if I go insert uh uh prompt here and if I go back to my DOT files back to my DOT files back to my DOT files repo it says this that's fine and if I repo it says this that's fine and if I repo it says this that's fine and if I now enter command mode it is also now enter command mode it is also now enter command mode it is also changing here so now I'm in command mode changing here so now I'm in command mode changing here so now I'm in command mode so that works as well and yeah it's a so that works as well and yeah it's a so that works as well and yeah it's a bit noisier than what I had but it looks bit noisier than what I had but it looks bit noisier than what I had but it looks pretty clean actually uh do I have any pretty clean actually uh do I have any pretty clean actually uh do I have any branches in branches in branches in get oh let's just check out M Bay uh get

  7. Bay uh get switch try in switch try in switch try in pandoc okay so that now that looks good pandoc okay so that now that looks good pandoc okay so that now that looks good get switch get switch get switch main okay and I'm not sure what what main okay and I'm not sure what what main okay and I'm not sure what what this means let's see if we can figure it this means let's see if we can figure it this means let's see if we can figure it out I I don't think I'm going to be out I I don't think I'm going to be out I I don't think I'm going to be doing much more configuration than this doing much more configuration than this doing much more configuration than this uh but I'm uh but I'm uh but I'm um I for now but I am interested in what um I for now but I am interested in what um I for now but I am interested in what this um via this um via this um via means also this looks very interesting means also this looks very interesting means also this looks very interesting the Azure module shows the current Azure the Azure module shows the current Azure the Azure module shows the current Azure subscription that's pretty subscription that's pretty subscription that's pretty cool kind of want to try that cool kind of want to try that cool kind of want to try that too um too um too um config Starship um do I even have a configuration file um do I even have a configuration file let's check that out CD cd.

  8. config config and FD and FD and FD star no there's no Starship star no there's no Starship star no there's no Starship configuration file configuration file configuration file so H just for the heck of it I'm just so H just for the heck of it I'm just so H just for the heck of it I'm just going to to try to create this Starship toml and let's just copy this or it toml and let's just copy this or it didn't work the other just now so I'm didn't work the other just now so I'm didn't work the other just now so I'm just going to do just going to do just going to do this let's try this let's try this let's try that ah well that was easy look now it's that ah well that was easy look now it's that ah well that was easy look now it's um telling me which which subscription um telling me which which subscription um telling me which which subscription I'm on that's pretty I'm on that's pretty I'm on that's pretty cool okay that that is pretty cool that cool okay that that is pretty cool that cool okay that that is pretty cool that is something that I kind of want what is something that I kind of want what is something that I kind of want what does it do if I go to a dott files repo does it do if I go to a dott files repo does it do if I go to a dott files repo now though oh okay so it is going always now though oh okay so it is going always now though oh okay so it is going always going to show my subscription here I going to show my subscription here I going to show my subscription here I see okay so this is starting to get see okay so this is starting to get see okay so this is starting to get pretty noisy with the main via this and pretty noisy with the main via this and pretty noisy with the main via this and the subscription but it was really easy the subscription but it was really easy the subscription but it was really easy to configure that though so to configure that though so to configure that though so H Let's uh see um battery container container get Branch get commit go wow there's a get Branch get commit go wow there's a get Branch get commit go wow there's a lot of stuff you can do with this lot of stuff you can do with this lot of stuff you can do with this kubernetes what is that display the kubernetes what is that display the kubernetes what is that display the current kubernetes contacts that's interesting o that is interesting o that is [Music] [Music] [Music] interesting okay well this is Starship

  9. interesting okay well this is Starship interesting okay well this is Starship is going to be a bit of a rabbit hole is going to be a bit of a rabbit hole is going to be a bit of a rabbit hole for me I I think but again I you can do for me I I think but again I you can do for me I I think but again I you can do some really cool cool stuff with this some really cool cool stuff with this some really cool cool stuff with this but my prompt actually no wait you know but my prompt actually no wait you know but my prompt actually no wait you know what I I want my prompt to be as minimal what I I want my prompt to be as minimal what I I want my prompt to be as minimal as as as possible it is cool to see what you can possible it is cool to see what you can possible it is cool to see what you can do though but let me see can I CH let's do though but let me see can I CH let's do though but let me see can I CH let's check out via what does check out via what does check out via what does this via what does this via what does this via what does that that that um what does that via um what does that via um what does that via mean mean mean um um um configuration configuration configuration why can't I see it's say showing this via all the see it's say showing this via all the time via time via time via nodejs python project on G trunk via Pi can I Google it Pi can I Google it Starship what the via mean okay I'm getting all sorts of stuff mean okay I'm getting all sorts of stuff about SpaceX about SpaceX about SpaceX uh uh uh Starship Starship Starship [Music]

  10. no let me see this preset Heights the no let me see this preset Heights the version of language run times if you version of language run times if you version of language run times if you work in containers or vir environments work in containers or vir environments work in containers or vir environments this is for this is for this is for you is that what I want oh maybe that's what it format via oh maybe that's what it format via symbol if you see symbols that you don't if you see symbols that you don't recognize you can use Starship explain recognize you can use Starship explain recognize you can use Starship explain the currently showing modules oh that's the currently showing modules oh that's the currently showing modules oh that's interesting let's check that out interesting let's check that out interesting let's check that out Starship Starship Starship explain explain explain ah oh this is ah oh this is ah oh this is cool okay here's a breakdown of your cool okay here's a breakdown of your cool okay here's a breakdown of your prompt dot files the current working prompt dot files the current working prompt dot files the current working directory on Main the active branch of directory on Main the active branch of directory on Main the active branch of the repo in your current the repo in your current the repo in your current directory via the currently installed directory via the currently installed directory via the currently installed version of Lua oh that's what it

  11. version of Lua oh that's what it version of Lua oh that's what it means means means okay on the current Azure subscription okay on the current Azure subscription okay on the current Azure subscription and a character usually an arrow beside and a character usually an arrow beside and a character usually an arrow beside where okay that's what it means where okay that's what it means where okay that's what it means so this icon means Lua and in my DOT so this icon means Lua and in my DOT so this icon means Lua and in my DOT files repo there is Lua code and that's files repo there is Lua code and that's files repo there is Lua code and that's what it's uh sh going what it's uh sh going what it's uh sh going apparently so if I go to my go apparently so if I go to my go apparently so if I go to my go repo um what is it repo um what is it repo um what is it CD go well won't it say anything here go well won't it say anything here because it's not Co no go code uh because it's not Co no go code uh because it's not Co no go code uh Starship Starship Starship explain won't show any go code explain won't show any go code explain won't show any go code apparently but okay that's what it does apparently but okay that's what it does apparently but okay that's what it does so the dot files repo has this via okay so the dot files repo has this via okay so the dot files repo has this via okay well that's the Starship explain command well that's the Starship explain command well that's the Starship explain command then let's check out then let's check out then let's check out Starship help Starship help Starship help completions edit the Starship completions edit the Starship completions edit the Starship configuration explain print a specific prompt explain print a specific prompt module oh module oh module oh cool I cool I cool I see prints the full Starship see prints the full Starship see prints the full Starship prompt Starship cool cool cool cool okay so now I know cool cool cool cool okay so now I know what the V means um I'm going to keep

  12. what the V means um I'm going to keep what the V means um I'm going to keep that for that for that for now however I am going to I think I now however I am going to I think I now however I am going to I think I don't want to see my Azure subscription don't want to see my Azure subscription don't want to see my Azure subscription all the time like that's not really all the time like that's not really all the time like that's not really useful to me useful to me useful to me so let's see I'm going to go into the do so let's see I'm going to go into the do so let's see I'm going to go into the do config and then the Starship the config and then the Starship the config and then the Starship the toml okay well I'm not going to use that toml okay well I'm not going to use that toml okay well I'm not going to use that anymore anymore anymore and just for the fun of it let's uh try and just for the fun of it let's uh try and just for the fun of it let's uh try out another out another out another configuration so we had configuration so we had configuration so we had Azure we had uh container what is that Azure we had uh container what is that Azure we had uh container what is that displays symbol and container name if displays symbol and container name if displays symbol and container name if inside a container no I don't need inside a container no I don't need inside a container no I don't need that umnet get start get get start get metric should number of added and metric should number of added and metric should number of added and deleted lights in the current okay deleted lights in the current okay deleted lights in the current okay that's pretty fun that's pretty fun that's pretty fun Helm current installed version of Helm Helm current installed version of Helm Helm current installed version of Helm well I don't why would you want that in well I don't why would you want that in well I don't why would you want that in your your your prompt and kubernetes yeah it's fun to prompt and kubernetes yeah it's fun to prompt and kubernetes yeah it's fun to see the current context at all times but see the current context at all times but see the current context at all times but it's not that NE it's not that NE it's not that NE necessary no oh no no I don't need all necessary no oh no no I don't need all necessary no oh no no I don't need all of that no okay so I thought maybe I of that no okay so I thought maybe I of that no okay so I thought maybe I needed a configuration file for now but needed a configuration file for now but needed a configuration file for now but I I don't need that so I'm going to I I don't need that so I'm going to I I don't need that so I'm going to actually just remove the Starship toml

  13. actually just remove the Starship toml actually just remove the Starship toml for for for now and now I just have a clean prompt now and now I just have a clean prompt now and now I just have a clean prompt it will show me my branch and it will it will show me my branch and it will it will show me my branch and it will show me this uh now I know that this is show me this uh now I know that this is show me this uh now I know that this is Lua but if I'm just in my home directory Lua but if I'm just in my home directory Lua but if I'm just in my home directory it works pretty nice and this is it works pretty nice and this is it works pretty nice and this is basically all I need really in my prompt basically all I need really in my prompt basically all I need really in my prompt it is nice and distraction free if I go it is nice and distraction free if I go it is nice and distraction free if I go to my home lab it shows my changes and to my home lab it shows my changes and to my home lab it shows my changes and yeah this is uh this is all I need for yeah this is uh this is all I need for yeah this is uh this is all I need for now so Starship really cool works out of now so Starship really cool works out of now so Starship really cool works out of the box uh I'm going to clean up my my the box uh I'm going to clean up my my the box uh I'm going to clean up my my DOT files uh repo now I'm going to just DOT files uh repo now I'm going to just DOT files uh repo now I'm going to just remove all of remove all of remove all of this and I going to say moved to this and I going to say moved to this and I going to say moved to Starship um what's the date today it's Starship um what's the date today it's Starship um what's the date today it's the 20th of March the 20th of March the 20th of March 203 2024 for all my prompt needs okay and up 2024 for all my prompt needs okay and up here we had this thing about PS1 we here we had this thing about PS1 we here we had this thing about PS1 we don't need that anymore so no PS1 in don't need that anymore so no PS1 in don't need that anymore so no PS1 in here and then the what's it called the kit prompt is there anything else in the kit prompt is there anything else in prompt no nothing here and finally I'm prompt no nothing here and finally I'm prompt no nothing here and finally I'm going to also adjust my setup going to also adjust my setup going to also adjust my setup script uh script uh script uh here close

  14. this and in dot I have my setup script this and in dot I have my setup script and I'm going and I'm going and I'm going to uh let's see prompt set up get prompt to uh let's see prompt set up get prompt to uh let's see prompt set up get prompt delete all of delete all of delete all of that prompt nothing and then on Brew I'm that prompt nothing and then on Brew I'm that prompt nothing and then on Brew I'm going to going to going to see uh Brew packages Mac I'll do see uh Brew packages Mac I'll do see uh Brew packages Mac I'll do Starship and Starship easy as that okay so my DOT Starship easy as that okay so my DOT files are nice and clean my setup is files are nice and clean my setup is files are nice and clean my setup is added and it looks a lot better Starship and then we're done pretty cool Starship and then we're done pretty cool very happy with that Starship highly very happy with that Starship highly very happy with that Starship highly recommend it check it out and see you in recommend it check it out and see you in recommend it check it out and see you in the next the next the next video

Summary

The main theme is configuring a Git prompt for a clean and informative experience. Key subjects include Zsh, Bash, .dotfiles, and the Starship prompt tool. The practical takeaway is that while flashy prompts can be distracting, a minimalist approach that clearly shows Git branch and modification status is preferred and achievable with tools like Starship.

View original episode ↗