-
Notifications
You must be signed in to change notification settings - Fork 5
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
division #4
Comments
Seems weird. So you also need to close the opened single quote. But in this special case, you can actually skip the quotes too. Simply:
seems to work. The logic is: If ZSH sees a command which it cannot interpret (maybe like So 120/6 simply works, since zsh does not see it as anything valid. For more complicated expressions, you need |
@chadgh Is this issue resolved? P.S. I've updated the README with a comprehensive description of all the features with examples. |
Sorry, the example I put up didn't have the closing quote, but when I am doing this on the command line it does have the closing quote and does not work as advertised. I've tried with ', ", and no quotes and it always gives me the same result:
I thought it might have something to do with the zsh plugins/options I have turned on, but so far shutting them off hasn't made it work. |
@chadgh That issue hints at a wrong installation. Are you sure you have sourced the Also, try '2+3' as well, although if the above file has not been sourced, it wouldn't work either. |
'2+3' works perfectly. I've tried math operations for +, -, , *, %. Those all work great. Even other python code works. There must be something strange with either my setup or the way it is working because it doesn't seem to like the / character. As another example, I'm assuming this should work: 'print("http://google.com")' but it fails with:
|
This is bewildering! If it is showing the error Can you:
Sorry for the code, its much easier to describe the intention unambiguously with code 😄 |
No problem. I totally get that. So I did that and unfortunately it still didn't work. I can tell it took effect because I have a different prompt now and the other python code examples work, but the Just in case it might help, I'm running zsh 5.2. I'm not sure if that makes a difference or not. |
The only thing I can think of is, maybe your terminal emulator is playing tricks. Which terminal do you use? (Gnome terminal, urxvt, st, xterm). I use urxvt. Do you use I also use zsh 5.2. A better way to debug this would be either one of:
I'm really curious about this issue 😕 If only I could reproduce this. Let me know the terminal atleast. |
I'm using terminator and do work in tmux. That, however, doesn't seem to be the problem either. I tried in both xterm and urxvt with no tmux and am getting the same result (most things working, I also tried just the simplified I tried sending a message on IRC, but I'm not too familiar with it and am not sure I sent a message correctly. 😦 Don't worry too much about it. It it is really just my setup then I'll eventually figure out a way to get it to work and will update this issue. |
You did send the messages correctly. Just that I was asleep at that time 😄 (My client keeps me online all the time). In any case, let me know if you figure this out sometime! Meanwhile, you could use the |
Probably because of the slash, ZSH treats it as a directory. Maybe there is a similar handler, for no file or directory ( |
I see what you mean. But the program is in a single quoted environment, nothing should take effect inside that AFAIK. |
No, works for me (zsh 5.2, prezto, Arch Linux, default python is python 3, terminal emulators: tilda and konsole):
|
Still doesn't work for me (zsh 5.2, Arch Linux, default python is python 3 (3.5.1), terminal emulators: terminator and xterm) |
Works on xterm... |
Maybe the zpyi version is old? There have been a few commits since the report date. |
Just updated. No luck :( |
Try running zsh in 'safe mode':
|
:( I'm really at a lose here. I did that exactly and got the same thing
|
What about Python's floor division operator: |
Nope, same thing. |
@chadgh Am I correct in assuming '25 / 5' works, but '25/5' doesn't? |
I love this. Thanks!
I'm wondering if I am doing something wrong or if it isn't supported, but I can't seem to do division.
$ '120/60
Gives
zsh: no such file or directory: 120/60
The text was updated successfully, but these errors were encountered: