-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Not compatible with Zsh #117
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
Comments
You need to create an alias for rake in your .zshrc. Like this: alias rake="noglob rake" With that in place you'll be good to go. |
Thanks @zan5hin! I should add that to the setup docs! |
If you don't feel like not globbing, the following works fairly well, too:
It probably dies on a lot of characters, but if you're in a bind, it's better than nothing. |
Had the same problem, the .zshrc fix did not work, but @nserror comment worked. |
That's pretty awful. Perhaps I should ditch the inline variable and make it a dialog?
|
I like that idea |
I think a dialog prompt would be better as well. It seems to be unhappy with a bunch of the character combinations I've tried. |
For example, post titles with commas in them generate files that are truncated after the comma, likely as a result of how the [] expression is parsed. Unless I'm just too stupid to figure out how to properly escape it... |
I'm sorry for the annoyance, I didn't realize rake was so poor at arguments. This is on the list of coming attractions. |
I'm not able to create a posting with a comma either. Using a \ to escape the comma didn't help. If you do add a prompt for the post name, could that be optional? I.e., if I enter |
Yeah I don't want everyone to have to relearn how to post. If the args are empty it'll ask for a title. Good thought. |
Calling |
I'm having the same trouble, and if I write |
I'm currently working full steam on getting the 2.1 release ready. It's going to be in there. Sorry for the delay. I'm hoping to have it up this weekend. |
Oh, nice to hear that! I'll wait, then :) |
Still not working without the external quotes. 👎 btw tks @nserror |
Sooooo what's the news on this? |
Hmm... for my part I can say it all works for me with alias rake='noglob rake' I have the latest Octopress. The old dialog is still in place. |
The alias fixed it for me as well, but it would be nice for Cctopress to support zsh without us having to alias things in our shell. Just thought I'd give this issue a bump. |
http://www.faqs.org/faqs/unix-faq/shell/zsh/ http://www.scottw.com/zsh-rake-parameters The problem isn't Octopress, per se. The problem is globbing. I just tried to google the size of the problem, and found it virtually non-existent. So, I started looking at zsh more closely and happened upon this: http://zsh.sourceforge.net/Doc/Release/Expansion.html#Filename-Generation
The issue is Octopress' rake command "rake new_post['his is a new post?']" contains an unquoted instance of [ Perhaps Octopress should have a command like? rake new_post="This is a new post?" But no, if you look at http://rake.rubyforge.org/files/doc/rakefile_rdoc.html (Tasks with Options) you see...
So, even if zsh weren't a problem, it appears the proper command in Rake syntax should be: rake "new_post[This is a new post?]" Not only would that be canonical, it should also get around the zsh glob issue as the left square brace would be in quotes. We are a victim of Rake's syntax, not Octopresses, I'm afraid. But, I like my non-globbed overlord. |
I like the idea of a dialog/prompt for this; the resulting syntax is much more Rake-like and is much easier to remember. |
good work for me |
I wrote a function to side-step this issue (and just do new-post "title"). https://gist.github.com/2708914 Handles the globbing issue too. This tops the results on Google for "octopress and zsh" (and it's where I figured out how to resolve my problem), so I figured I'd leave this here for the benefit of future searchers. For everybody else, sorry about the notification spam! |
I've just added bfa5255 which asks for a post title from stein if you run new_post without a value. |
- Inline input as in `rake new_post["Your post title"] - Input from stdin if in-line input isn't given. This should help zhs users who've been frustrated by globbing issues. Fixes imathis#117
Definitely appreciate the .zshrc alias comment. Fixed the issue for me, too. |
@imathis per your bfa5255 commit, I tried, Did you change this? |
@westonplatter Rake new_post has had defaults for a long time. |
Latest version, used here with oh-my-zsh, some issues still persist:
I can't put special chars like: $!@#%^&.. in the title. But it's okay... |
Try creating an alias like this |
Already did that. |
+1 for zsh support. |
the |
|
Had the same problem, the .zshrc fix did not work, but @nserror comment worked.thanks. |
thanks good work for me |
I have the same problem, but using |
Hello,
The Rake task for creating a new post seems to be not compatible with Zsh.
The text was updated successfully, but these errors were encountered: