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

Add Root checking and dispalying #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Root checking and dispalying #34

wants to merge 3 commits into from

Conversation

athul
Copy link
Owner

@athul athul commented Sep 1, 2020

Closes #33

@Micha-Btz could you try it out on your system?

@Micha-Btz
Copy link

Yes I will test it tonight. Thanks a lot.

@Micha-Btz
Copy link

Seems to work only in the home directory from root.

My intention was to have always root in the prompt as it is on a Debian default machine, equal if logged in as root or changed to root via sudo or su. I should had it described more precise.

> 🐭 ~/source/go/src
> ❯ su
> Passwort: 
>  /home/mdomann/source/go/src
> ❯ cd 
>  root ~
> ❯ ls
> dotfiles  Release.key
>  root ~
> ❯ cd /etc/
>  /etc on  master [1!] 
> ❯ cd
>  root ~
> ❯ cd /usr/
>  /usr
> ❯ cd /var
>  /var
> ❯ 

@athul
Copy link
Owner Author

athul commented Sep 2, 2020

@Micha-Btz could you check now?

@Micha-Btz
Copy link

hey,
I think it's working now.

root ~/var
cd
root ~/root
cd /usr/
root ~/usr

For optical reason it will be cool the tilde ~ is only used in the home of root and would be not displayed in other paths.

Thanks.

@athul
Copy link
Owner Author

athul commented Sep 3, 2020

Could you test now

@Micha-Btz
Copy link

root at /etc
❯ cd
root at ~
❯ cd /var/
root at /var
❯ cd /etc/
root at /etc
❯ cd
root at ~

now its fine. Thank you

@Micha-Btz
Copy link

Seems that working in git is not showing anymore:

 ~/source/shelby on  master [3!][1+] 
❯ cd
 ~
❯ su
Passwort: 
 root at /home/mdomann

@Micha-Btz
Copy link

root at /home/mdomann
❯ cd /etc/
 root at /etc
❯ gs
Auf Branch master
Revert zurzeit im Gange.
  (Führen Sie "git revert --continue", um weiterzumachen)
  (benutzen Sie "git revert --skip", um diesen Patch auszulassen)
  (benutzen Sie "git revert --abort", um die Revert-Operation abzubrechen)

Änderungen, die nicht zum Commit vorgemerkt sind:
  (benutzen Sie "git add <Datei>...", um die Änderungen zum Commit vorzumerken)
  (benutzen Sie "git restore <Datei>...", um die Änderungen im Arbeitsverzeichnis zu verwerfen)
	geändert:       btrbk/btrbk-daylies.conf
	geändert:       btrbk/btrbk.conf

keine Änderungen zum Commit vorgemerkt (benutzen Sie "git add" und/oder "git commit -a")
 root at /etc

@athul
Copy link
Owner Author

athul commented Sep 6, 2020

Damn, New Changes tend to bring up new shortcomings. I'll look more into it

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.

show root user all the time
2 participants