1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 07:24:51 +08:00
Commit Graph

12 Commits

Author SHA1 Message Date
Marc Cornellà
774c4eca6f Revert "Fix pj() function when no project has been specified"
This reverts commit 7d298a3059.
2016-08-21 00:09:59 +02:00
Marc Cornellà
bec53135e4 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-08-16 08:32:43 +02:00
Marc Cornellà
7d298a3059 Fix pj() function when no project has been specified 2016-08-16 08:32:43 +02:00
Marc Cornellà
7f8851f52f 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-08-16 08:32:43 +02:00
Marc Cornellà
c9c11d605f 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-08-16 08:32:43 +02:00
Marc Cornellà
26bef0942b Add Readme to pj plugin 2016-08-16 08:32:43 +02:00
Marc Cornellà
525ee50815 Clean up comments in pj plugin file and reorganise 2016-08-16 08:32:43 +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