Skip to content

support Administrator in fish_prompt.fish #7031

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

Closed
gMan1990 opened this issue May 23, 2020 · 2 comments · Fixed by #7123
Closed

support Administrator in fish_prompt.fish #7031

gMan1990 opened this issue May 23, 2020 · 2 comments · Fixed by #7123

Comments

@gMan1990
Copy link

gMan1990 commented May 23, 2020

> uname -a
CYGWIN_NT-10.0 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
  • fish_prompt.fish
    if contains -- $USER root toor Administrator
@faho
Copy link
Member

faho commented May 23, 2020

Yeah this should probably be a helper function - fish_is_root_user.

That way we wouldn't have to change it in every single prompt. 9 of our 16 prompts do this, one only checks for "root".

@faho faho added this to the fish-future milestone May 23, 2020
@damani42
Copy link
Contributor

I'm really interesting to work on this issue. I will make this soon as possible.

damani42 added a commit to damani42/fish-shell that referenced this issue Jun 17, 2020
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.

Fixes: fish-shell#7031
damani42 added a commit to damani42/fish-shell that referenced this issue Jun 17, 2020
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.

Fixes: fish-shell#7031
damani42 added a commit to damani42/fish-shell that referenced this issue Jun 18, 2020
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.

Fixes: fish-shell#7031
damani42 added a commit to damani42/fish-shell that referenced this issue Jun 23, 2020
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.

Fixes: fish-shell#7031
faho pushed a commit that referenced this issue Jun 26, 2020
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.

Fixes: #7031
@zanchey zanchey modified the milestones: fish-future, fish 3.2.0 Jul 1, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants