linkedin / school-of-sre

At LinkedIn, we are using this curriculum for onboarding our entry-level talents into the SRE role.
https://linkedin.github.io/school-of-sre/
Other
7.7k stars 705 forks source link

Suggestion to improve readability of shell commands #83

Closed opethe1st closed 3 years ago

opethe1st commented 3 years ago

I was looking at the shell commands here and I found the user prompt very distracting. It currently looks like this.

spatel1-mn1:school-of-sre spatel1$ git branch b1
spatel1-mn1:school-of-sre spatel1$ git log --oneline --graph
* 7f3b00e (HEAD -> master, b1) adding file 2
* df2fb7a adding file 1

but it would be better in my opinion if it looked like this

$ git branch b1
$ git log --oneline --graph
* 7f3b00e (HEAD -> master, b1) adding file 2
* df2fb7a adding file 1

or since the current branch important to understand what a git command would do.

(master)$ git branch b1
(master)$ git log --oneline --graph
* 7f3b00e (HEAD -> master, b1) adding file 2
* df2fb7a adding file 1

I think this is better and easier to understand since the git commands stand out

What do you think?

I'm also willing to make a PR for this if this sounds like a reasonable idea.

Thanks for sharing free knowledge, I wish I came across this when I was in uni. Cheers!

kalyanceg commented 3 years ago

We will be happy to review the PR @opethe1st @sanketplus please leave your thoughts as you own the Git module Based on the outcome we can decide if we have to update Guidelines for future bash snippets

sanketplus commented 3 years ago

totally valid suggestion @opethe1st. Do raise a PR. Latter suggestion looks good but since the branch would not be shown unless you customize bash prompt, let's go with the first suggestion.

Happy to know this was useful :)

opethe1st commented 3 years ago

I am fine with customising the bash prompt :) but the first is also fine. At work right now, so this will be later after work. Cheers

sanketplus commented 3 years ago

appreciate your help @opethe1st, PR merged 🎉

opethe1st commented 3 years ago

glad to help! Cheers!