-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Install script overwrites .bashrc file #115
Comments
Hey @Antoine-marchais , At this moment, it's the expectation to overwrite the content of .bashrc. I'm thinking about to move it to |
hey there, why not running an extra line to create a backup if |
@dreais Yes, we do support that functionality. If you take a look into https://github.com/ohmybash/oh-my-bash/blob/master/tools/uninstall.sh You will see that whenever you execute |
hey @nntoan! sorry, my bad, i quickly looked at the installation script and i didn't find it! thanks for confirming tho :) |
I feel it's a little presumptuous to "intend" to overwrite a user's .bashrc file. Maybe not everyone uses it, but those of us that do, it's where we keep our personal configuration. My .bashrc was indeed backed up to .bashrc.pre-oh-my-bash, but I didn't find any reference to my old file in the replaced one. Why not try to make oh-my-bash a modular addon, where it supplements what a user has, instead of replacing everything? With the current method, if I then make changes to .bashrc (oh-my-bash's version), and then decide to uninstall OMB later, I'll lose those changes, because my original .bashrc will be restored. What about sourcing a .bashrc-oh-my-bash file with OMB specific settings? This way, config isn't tied to one or the other, in case OMB is installed/uninstalled. |
If you run the instalation twice, like I did for some reason... the .bashrc.pre-oh-my-bash will be overwrited I the old one will be lost. Maybe you should create the .bashrc backup using a date in the name, like you did with the file create after uninstall: .bashrc.omb-uninstalled-20200806201204 |
I just created another ticket that is similar to this one. There's no need to overwrite anything in .bashrc, and I think that most people who are using oh-my-bash are somewhat in the category of "power users". So, changes should be isolated. Maybe the default behavior is to add one line to .bashrc to source the script, but the changes are way too destructive for my taste. Also, to overwrite .bashrc at each update is far too aggressive. I really like oh-my-bash, but being so aggressive with a system file (even if it's a personal one) might end up being too much for me. |
I think it's the opposite. Oh My Bash targets newcomers who don't know where to start customizing Bash and have never (largely) modified their This behavior of replacing the rcfile is coming from the original Oh My Zsh. Bash-it also behaves in the same way by default. It's common to replace the rcfile for this kind of configuration framework. To be honest, I also don't like the behavior of replacing the rcfile for my taste, but there is significant demand for that. But now those upstream projects seem to start supporting the options to suppress replacing the rcfiles, so we may also have such options.
Sure. That's also too much for me, but it depends on the user. I'm not a user of Oh My Bash. I just took over maintenance of this project because there didn't seem to be any users who could properly maintain those Bash scripts and started to cause problems to my own project unlimitedly. |
I'm not sure how there is any justification of overwriting bashrc vs like most other configuration scripts do and append to it. I am on Ubuntu and there's a ton of configuration of the system that is far more important than a pretty prompt and it took me by surprise after installing oh-my-bash and realizing it just nonchalantly backs up my bashrc and just wipes everything with configuration for itself. It's pretty sillly. |
Have you read the part you quoted? I explained the background of the current way in the part you quoted. Your reply doesn't include any arguments related to the background explained there. Both approaches have pros and cons, and the user needs to choose the framework depending on their needs.
What types of configuration scripts do you assume when you say most? Oh My Bash provides the theme, which can conflict with the existing theming if it just appends its setting to For the theming configurations, I don't think it is possible to automatically detect if there is an existing theme in
As far as I remember, in Ubuntu, the important system configurations are supposed to be loaded from
What is silly? Sure, it's not ideal, but there is a background. |
Note on newer versions the |
Steps to reproduce
Expected result
The oh my bash contents are append to the end of the file.
Actual result
The .bashrc is overwritten
Note : Maybe it is good practise to have the aliases and paths in ~/.profile in which case I apologize for my ignorance, but a little warning would go a long way
The text was updated successfully, but these errors were encountered: