zpm-project / zpm-zsh

zsh plugin manager in ansi C.
GNU General Public License v3.0
5 stars 3 forks source link

Disable/remove #15

Closed fennecdjay closed 7 years ago

fennecdjay commented 7 years ago

@zpm-project/zpm-zsh yet has to figure every needed test, but the C part migth be ok.

desyncr commented 7 years ago

I think that for remove there should be:

For disable:

fennecdjay commented 7 years ago

Fine. Probably coming soon.

fennecdjay commented 7 years ago

Also there is a check that plugin is unlisted.

fennecdjay commented 7 years ago

Sorry, I hit a bug: zpm does not print anything if ~/.zpm/.plugin_list is prsent but empty. Fixing this first.

fennecdjay commented 7 years ago

It seems test fails or not depending on zsh version. Fixing it right now.

desyncr commented 7 years ago

It's the same issue with ls command's output: https://travis-ci.org/zpm-project/zpm-zsh/jobs/198123860#L180

fennecdjay commented 7 years ago

This one is a typo. it should read `'.*/.zpm/plugins/zsh-users/zsh-syntax-highlighting'

fennecdjay commented 7 years ago

It seems to work on my station now. pushing.

desyncr commented 7 years ago

Let me take a look at this.

desyncr commented 7 years ago

On OS X I got:

$ zpm "zsh-users/zsh-syntax-highlighting" > /dev/null
$ zpm remove "zsh-users/zsh-syntax-highlighting" > /dev/null
$ ls ~/.zpm/plugins/zsh-users/zsh-syntax-highlighting
-  ls: cannot access '.*/.zpm/plugins/zsh-users/zsh-syntax-highlighting': No such file or directory (re)
-  [2]
+  ls: /Users/mini/.zpm/plugins/zsh-users/zsh-syntax-highlighting: No such file or directory
+  [1]

I solved it with https://gist.github.com/desyncr/f67abee8b1d858aad008bd2dc8273bd7

desyncr commented 7 years ago

Another thing I noticed is that (also on OS X) zpm list returns a weird character:

 ▲ ~/Playground/zpm-zsh make test
gcc -Wall -o zpm -g zpm.c
cram ./zpm.t
!
--- zpm.t
+++ zpm.t.err
@@ -63,6 +63,7 @@
   [1]
   $ zpm list
   rupa/z .* (re)
+  \xf0 (esc)

 Can install multiple plugins under the same user.

# Ran 1 tests, 0 skipped, 1 failed.
make: *** [test] Error 1

I believe this is a off-by-one error. Should check the implementation a bit further.

fennecdjay commented 7 years ago

I'm gonna fix it for travis, maybe we'll handle zsh-version/OSX issues later.

fennecdjay commented 7 years ago

It migth be a good thing to test for OSX too.

os:
  - linux
  - osx

yet install phase migth be different. However, when can test TRAVIS_OS_NAME value to do the appropriate thing.