dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Dotfile management script looks shit

Open RangHo opened this issue 3 years ago • 1 comments

I don't know what I was thinking, but this whole "literate programming" thing looks horrible. I would keep this whole is-check stuff for the meme, but I should at least change how it looks. Maybe something like below:

Before:

# To check existence of a file
is "/path/to/some/file" file?
if yes; then
    rm -f /path/to/some/file
fi

After:

# To check existence of a file
if is "/path/to/some/file" file; then
    rm -f /path/to/some/file
fi

RangHo avatar Aug 18 '22 13:08 RangHo

While I'm at it, re-organize some functions as well.

For example, append and contains basically does array operations so rename them to array_append and array_contains and group them together.

RangHo avatar Aug 18 '22 14:08 RangHo