linutil icon indicating copy to clipboard operation
linutil copied to clipboard

Bash Prompt munched my .bashrc

Open Zazucki opened this issue 1 year ago • 1 comments

Describe the bug

Running the bash prompt twice ended up deleting my original .bashrc via the .bashrc.bak file not being checked if it exists already before being overwritten.

To Reproduce

run bash-prompt script more than once (common with failures)

Expected behavior

Ideally, number the .baks or at least check if it exists.

Screenshots

N/A

Additional context

FWIW this is my fault, but with the script having some problems I could see people making the same mistake, retrying after a failure and then losing their original .bashrc because it made a backup of the titus rc file that it already wrote from the first (failed) attempt, which overwrites the .bak that contains their real original .bashrc

Zazucki avatar Sep 06 '24 22:09 Zazucki

This should be moved over to the mybash repository.

ghost avatar Sep 07 '24 03:09 ghost