-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add save command. #25
Conversation
also fix small memroy leak also fix update command return value
We're almost done! |
Nice! I'm gonna take a look tonight! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes.
README.md
Outdated
To remove plugin: | ||
|
||
```sh | ||
zpm remove user/plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not actually necessary but to keep a unified syntax on the README.md and in general, it should quote the plugin name. ie: zpm remove "user/plugin"
zpm.c
Outdated
printf("#!/bin/sh\n"); | ||
memset(entry, 9, PATH_MAX); | ||
while( fgets(entry, PATH_MAX, store)) { | ||
printf("zpm %s", entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need quotes on plugin name.
To make a copy of your config | ||
|
||
```sh | ||
zpm save > .zpmrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably will need to explain the workflow with an example. Ex:
Install some plugins:
zpm "some/plugin"
zpm "other/plugin"
Then you can persist your current configuration to be able to commit it into a dotfile repository:
zpm save > ~/dotfiles/.zpmrc
Next time you'll only need to install them like so:
source ~/dotfiles/.zpmrc
zpm.c
Outdated
char* zpm_init = get_plugin_list_path(); | ||
FILE* store = fopen(zpm_init, "r"); | ||
|
||
printf("#!/bin/sh\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is no need for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I just tought it was more correct.
Removing it.
Maybe you should rework the README.md, as you clearly know zpm's workflow better than I do. |
Seems fair. I'll create another issue for the README.md |
Last thing would be to add |
On a quick test it failed to I also believe we could change terms: "remove" for unlinking/remove directory, and "disable" to remove plugin from listing. It's a small thing but it's best to get it correct the first time. |
If you agree, I'll comment everything in rmdir_r(), and just use something like system("rm -r xxx") so we get the functionnality, until I fix that function. |
@fennecdjay I do agree. For now it'll suffice. |
We can ignore Travis warning for now, as it complains about rake (?). |
Also, I see you created zpm-project organisation, so I suppose you expect next PR to be there. |
Oups... |
@fennecdjay There is a lot of comments and useful interactions, so let's keep it here until the final approval. Then we'll move to zpm-project. Sorry for the mess up but it has to be sooner or later :) |
Very good to me. ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing.
zpm.c
Outdated
@@ -217,6 +217,118 @@ int mkdir_p(const char *path) { | |||
return 0; | |||
} | |||
|
|||
int rmdir_r(const char *path) { | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all this commented out code.
zpm.t
Outdated
@@ -31,8 +31,8 @@ Subsequentially add a new item to the list. | |||
List command show list of installed plugins. | |||
|
|||
$ ./zpm list | |||
zsh-users/zsh-syntax-highlighting | |||
rupa/z | |||
zsh-users/zsh-syntax-highlighting .* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add tests for this but for now I want to get this merged ASAP to avoid huge git conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine. reverting to master version for now.
One last thing then we can merge this. Once done you have to create a new PR in |
I'm waiting for your signal to either do more changes or create PR in zpm-project/zpm-zsh repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are done! Great job! Let's move it to zpm-project/zpm-zsh
repository.
Great! doing it rigth now. |
Also, remember to review zpm-project#6 |
Sure thing! |
Moved to zpm-project#12 |
…nfiguration Add OS X to travis ci configuration
Here it is ;-)
It looks just fine to me.