dogsbodytech / workstation-tools

This is a collection of tools and scripts we use on our personal workstations.
MIT License
1 stars 1 forks source link

Improve bash_alias update process #5

Open ghost opened 5 years ago

ghost commented 5 years ago

Currently you need to manually remove commands from bash_aliases for it to be re-created. The intention was to stop duplicate commands being set up.

We should be able to fix this update process issue and retain the no-duplicates aim by adding the following command before we set up new aliases: sed -i '/randpw() { for i in/d' ~/.bash_aliases

dogsbody commented 5 years ago

Would prefer if we used sed -i '/^randpw() /d' ~/.bash_aliases as it doesn't assume the way that the old alias is setup.

ghost commented 5 years ago

Yep I suggest we base the sed line off of the grep commands.

For whoever picks this up, these are the jobs that need doing off of this: