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

oh-my-bash: We should not overwrite existing .bashrc.pre-oh-my-bash #267

Closed
TotallyNotAHaxxer opened this issue Dec 16, 2021 · 13 comments · Fixed by #284
Closed

oh-my-bash: We should not overwrite existing .bashrc.pre-oh-my-bash #267

TotallyNotAHaxxer opened this issue Dec 16, 2021 · 13 comments · Fixed by #284

Comments

@TotallyNotAHaxxer
Copy link

couldnt run commands like iwconfig or ipconfig without being root after installing, tried removing the bash file and remaking it myself and never ended up working. it annoys me, i dont want to be root everytime i poweroff my machine which is not necessary, basic commands like wireshark, owasp-zap, sqlmap, iwconfig, dir, pwd, ifconfig, etc etc will resolve in the error command not found i have not installed anything other than this bash theme and apparently it likes to kill shells

@pcroland
Copy link

pcroland commented Dec 19, 2021

switch to zsh + ohmyzsh + p10k

@prldm
Copy link

prldm commented Dec 19, 2021

even better: zsh4humans

@akinomyoga
Copy link
Contributor

@pcroland @preludium975 Could you describe how these are related to this issue?

@pcroland
Copy link

ohmybash is abandonware, you'll probably have to use something else.

@akinomyoga
Copy link
Contributor

So you don't know the reason why iwconfig and ipconfig became missing with oh-my-bash in @ArkAngeL43's environment? This is not the place to advertise the other frameworks but the place to discuss the solution to the problem.

@TotallyNotAHaxxer
Copy link
Author

finally someone with a bit more sense in this section 😂 i shouldnt have to end up using another enviroment cause of a BASH theme @pcroland its bash, not java or katoolin, its programmer error i would imagine

@akinomyoga
Copy link
Contributor

akinomyoga commented Dec 19, 2021

@ArkAngeL43 I'm actually not sure the reason for missing iwconfig and ipconfig in your environment, but if you have installed oh-my-bash with the way provided by oh-my-bash, I think there may be a backup file at ~/.bashrc.pre-oh-my-bash which is actually the original ~/.bashrc before you install oh-my-bash. If you can find that file, have you tried to recover the contents of .bashrc from this backup file?

@akinomyoga
Copy link
Contributor

If you don't find ~/.bashrc.pre-oh-my-bash, you need to reconstruct the original configuration. For the problem of iwconfig, probably you can add the following line in your new bashrc (though I don't think this is all what you have lost):

PATH=$PATH:/usr/local/sbin:/usr/sbin

@TotallyNotAHaxxer
Copy link
Author

@akinomyoga ive tried installing multiple times on different types ( all of which they provided ) tried to backup my bashrc file but even when i did that it would not go away or save, after removing the oh-my-bash file it still remained, after rebooting my PC the bashrc was back but i still had to use sudo to use the commands so in the end i just re installed the OS. i was not going to bother anymore

@akinomyoga
Copy link
Contributor

@akinomyoga ive tried installing multiple times

Ah, maybe this is the reason. I think the original .bashrc is lost when you installed oh-my-bash in the second time. Then, when you uninstall oh-my-bash, .bashrc is recovered to the one by the first installation of oh-my-bash. Maybe I can submit a PR to fix this issue, but I'm not sure if that PR would be reviewed since this project is abandoned or not maintained as @pcroland has mentioned (I actually have never used oh-my-bash but just watching the GitHub repository).

This framework oh-my-bash is actually a low-quality translation by @nntoan from a specific version of oh-my-zsh, and @nntoan doesn't seem to maintain at all after the initial translation. After that, @nntoan seemed to have just accepted PRs but recently have completely disappeared after setting up some sponsoring sites. I think the reason why this low-quality repository gained such a large number of stars is just because of its name being similar to the famous framework oh-my-zsh. Bash-it/bash-it is the community configuration for Bash that has similar goal with oh-my-zsh and, importantly, is maintained well. But I think you don't have to bother with these existing frameworks that rewrite .bashrc without letting users know the detail.

@akinomyoga
Copy link
Contributor

akinomyoga commented Dec 20, 2021

(Edit: added information of bash-it)

FYI:

  • Ref. [1] is the same issue in oh-my-zsh which was fixed by Ref. [2].
  • Ref. [3] was also the same issue in bash-it and fixed by Refs. [4,5].

References

Edit

#115 is also related.

@TotallyNotAHaxxer
Copy link
Author

thank you for the information then, i was quite confused how it can be popular and have errors since usually if someone keeps it up they will usually fix errors or find a bit better handling, but again thank you

@akinomyoga akinomyoga changed the title you're themes broke mr bash We should not overwrite existing .bashrc.pre-oh-my-bash Dec 24, 2021
@akinomyoga akinomyoga changed the title We should not overwrite existing .bashrc.pre-oh-my-bash oh-my-bash: We should not overwrite existing .bashrc.pre-oh-my-bash Dec 25, 2021
@akinomyoga
Copy link
Contributor

I have recently joined the maintainer team of oh-my-bash and addressed this issue. This has been solved by #284. Thanks

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 a pull request may close this issue.

4 participants