ellipsis / ellipsis

◦◦◦ Ellipsis is a package manager for dotfiles.
http://ellipsis.sh
MIT License
356 stars 29 forks source link

Add/Remove are not symmetrical operations #51

Closed assumptionsoup closed 7 years ago

assumptionsoup commented 8 years ago

As a new user to ellipsis, I expected add/remove to have symmetrical operations as they are direct antonyms of one another. That is to say, I had expected:

>>> ellipsis new dotfiles
>>> ellipsis add dotfiles ~/.bashrc
ellipsis added .bashrc to dotfiles repo
>>> ellipsis remove dotfiles ~/.bashrc
ellipsis removed .bashrc from dotfiles repo and restored .bashrc to original location.

Instead, as a new user my experience was:

>>> ellipsis new dotfiles
>>> ellipsis add dotfiles ~/.bashrc
ellipsis added .bashrc to dotfiles repo
>>> ellipsis remove dotfiles ~/.bashrc
>>> ls ~/.bashrc
ls: cannot access ~/.bashrc: No such file or directory
>>> shit.

I personally think add/remove should perform symmetrical operations - either adding/removing packages or adding/removing files. That may not be a realistic suggestion, depending on the maturity and direction of this project. As an alternative, I suggest that ellipsis remove should ask for confirmation before deleting a package with active links in it.

groggemans commented 8 years ago

Hi Jordan,

Thank you for your interest in the project!

This is indeed something that could be improved. I would like it more if add/remove handles files, and install/uninstall handels packages. This would make it more consistent with the commands used by most package managers out there.

Butt as you mention it would be quite a large change (although uninstall can already be used for removing packages).

Definitely not something we can change over a short period of time or in a minor version update..

I don't like the idea of asking user input, as this makes automation a lot harder.

What's your opinion @zeekay?

zeekay commented 8 years ago

I agree add/remove should be symmetrical. It would be pretty nice to be able to add/remove files from a given package. We should definitely improve things here.

Not opposed to interactive input as long as we just check for a controlling terminal and it's optional.

assumptionsoup commented 8 years ago

Very cool. I can't contribute yet (my current job has me legally bound by a copyright assignment), but I can May 1st. Let me know if you're interested.

groggemans commented 8 years ago

That would be awesome!

zeekay commented 8 years ago

@assumptionsoup Still up for tackling this one? You can chat with us on our Gitter: https://gitter.im/ellipsis/ellipsis.

groggemans commented 7 years ago

Implementation almost ready!

It will be split in 2 PR's. One that adds the new implementation for ellipsis remove. And one that I'm still working on to make the uninstall command a little safer when uncommitted changes or untracked files are present.