Commit graph

10 commits

Author SHA1 Message Date
Marc Cornellà
08ad38f0e6 Fix shwordsplit bug when a basedir contains spaces
The `shwordsplit` option affects all variables and we only need to split
the `$EDITOR` variable. Because of that, using `${=spec}` is a much better
alternative.

More info at
http://zsh.sourceforge.net/Doc/Release/Expansion.html#index-SH_005fWORD_005fSPLIT_002c-toggle
2016-09-03 09:54:46 +02:00
Marc Cornellà
f49596a68a Fix pj() function when no project has been specified 2016-09-03 09:54:46 +02:00
Marc Cornellà
b53da8fa59 Refactor pj function
- Use `emulate -L zsh` to make all variables local.

- Use `shwordsplit` to interpret `$cmd` spaces correctly.

- Rename `$project` and `$file` variables to the more appropriate `$basedir`
  and `$project`.
2016-09-03 09:54:46 +02:00
Marc Cornellà
fb392e308b Fix _pj completion function
- `$PROJECT_PATHS/*` wasn't working correctly. You have to iterate over
  its elements in order to use globbing with it.

- The `$projects:t` line wasn't necessary if we used `compadd`.

- `compadd` better supports destructuring an array with spaces in some
  of its elements.
2016-09-03 09:54:45 +02:00
Marc Cornellà
9739939543 Clean up comments in pj plugin file and reorganise 2016-09-03 09:54:45 +02:00
Kravchuk S.V
0c04470f63 [~] fix plugin pj
bce74975d0
2014-11-16 22:38:27 +03:00
Frank Louwers
bce74975d0 drop the foreach, make it even shorter. thanks Marc Cornellà! 2014-05-28 13:57:25 +02:00
Frank Louwers
df67f2ee30 [pj-plugin] avoid using basename. migth be (a lot?) faster 2013-02-13 13:39:47 +01:00
Frank Louwers
9674a96b5b [pj-plugin] delete ugly ls -l | awk print $9 thing to use something not depending on date format + add support for projects with spaces in them 2013-02-13 12:02:36 +01:00
Toon Claes
631a8473e2 added pj.plugin 2013-02-05 09:45:00 +01:00