Comments (19)
But internally there's no reason for codi.vim to use fish (or whatever the default 'shell' is). It can just call /bin/bash
or env bash
or whatever, with jobstart(['env', 'bash', ...])
. (Doesn't require modifying user's 'shell'.)
from codi.vim.
This is almost definitely caused by #61. Can you see if reverting 25d4742 fixes it on your end?
from codi.vim.
Well, shellescape shouldn't be used with writefile(). writefile() isn't using a shell...
from codi.vim.
Could be related to fish. Similar problem was reported here: justinmk/vim-dirvish#73
@decent1 If you change your shell to bash (including 'shellcmdflag' and all other shell-related options), does it help?
from codi.vim.
@justinmk, @cympfh had an issue where their version of script
couldn't find the python
command ($PATH
issues maybe?).
EDIT: I see what you mean, oops. I'll try that out.
from codi.vim.
Actually, shellescape()
should still probably used since the arguments to the interpreter (python
, etc.) still need to be "shell-escaped."
from codi.vim.
(Should add... a lot of these problems are caused by relying on the external script
executable, which differs in implementation across platforms. Have been planning a rewrite using Python's pty capabilities which should eliminate platform differences, but school's got me busy.)
from codi.vim.
Ok, so first I tried reverting the 25d4742 commit and that didn't help.
While leaving the commit reverted, I changed my default shell back to bash with chsh -s /bin/bash
and relogged (:echo $SHELL
outputted /bin/bash
), but that didn't help either. Log said the same thing:
[10:25:20.554876] <SNR>131_codi_handle_data[9]: [DATA] bash: /tmp/cmd: Permission denied
Then I tried chmod 777 /tmp/cmd
and Codi started working again! For some reason it doesn't work anymore with fish. (I'll soon try again with fish as I really want to use it instead of bash). I hard resetted the revert and as it didn't seem to have an effect one way or the other.
But is that permission denied thing a bug? I tried deleting /tmp/cmd and Codi just recreated it with -rw-rw-r--
permissions, which gives the permission denied.
EDIT: Tried again with fish, with and without the 25d4742, but no luck. I also updated my vim to 8.0.339 and that didn't help either.
from codi.vim.
Sorry I haven't commented on this issue in awhile. @decent1, would you mind pinning down the exact commit in which things broke?
from codi.vim.
@metakirby5 it seems to be commit 9a570ec. If I reset to one commit before it, Codi works again.
from codi.vim.
Ah ok, so it was that commit. I got the chronological ordering of the commits wrong so I thought that reverting 25d4742 would also revert 9a570ec. Mind posting your script
version info?
from codi.vim.
script from util-linux 2.27.1
from codi.vim.
Same issue here. Content of /tmp/cmd
is 'python'
, and from the log:
[19:48:28.281643] <SNR>50_codi_handle_data[9]: [DATA] zsh:1: permission denied: /tmp/cmd
After doing chmod u+x /tmp/cmd
codi starts responding. Not sure why it needs the file to be executable though.
from codi.vim.
My solution was to create the function below:
function s:AllowCodi()
if empty(glob('/tmp/cmd'))
call system('touch /tmp/cmd')
endif
call system('chmod u+x /tmp/cmd')
endfunction
And then I called it on VimEnter:
autocmd VimEnter * call s:AllowCodi()
from codi.vim.
Had the same problem, this solution fixed it but should probably be included into the plugin.
Here is with Fedora 26
with script from util-linux 2.30
from codi.vim.
Sorry for the delay. I've added a setfperm
call at 93cfc91. Please check out the cmd-perm
branch and see if it fixes the issue. I can't test Linux at the moment, but I would like to confirm that it works before merging it.
from codi.vim.
Tried with cmd-perm
branch and I don't get the permission error now. But I still don't get any output, at least with Fish shell. The log just says:
[09:49:29.840972] <SNR>154_user_au[1]: Doing autocommand CodiUpdatePre
[09:49:29.841350] <SNR>154_codi_do_update[29]: Starting job for buffer 1
[09:49:29.843900] <SNR>154_stop_job_for_buf[8]: Stopping job for buffer 1
[09:49:29.844653] <SNR>154_codi_do_update[65]: [INPUT] 5 + 5^@^M^D^D^M
[09:49:29.845605] <SNR>154_codi_do_update[66]: Expecting 2 prompts
[09:49:29.852668] <SNR>154_codi_handle_data[9]: [DATA] 5 + 5
[09:49:29.853246] <SNR>154_codi_handle_data[9]: [DATA] Session terminated.
But, if I checkout to commit e2aa007, Codi starts working again.
from codi.vim.
@decent1 Sorry, I had forgotten about the fish issue. What happens if you run /tmp/cmd
directly from your shell?
from codi.vim.
~ ยป /tmp/cmd
Failed to execute process '/tmp/cmd'. Reason:
exec: Exec format error
The file '/tmp/cmd' is marked as an executable but could not be run by the operating system.
I'm noob with linux, so I don't know if this helps, but fish says this when the beginning of the file is missing shebang and it won't know what to do with the contents.
from codi.vim.
Related Issues (20)
- [Feature request] Add .svelte (.js & .ts) interpreter
- Not show any thing after :Codi HOT 6
- Codi seems to append quotes at the end. HOT 1
- Simply doesn't work with ruby HOT 4
- jq support? HOT 1
- Haskell Support Not Working HOT 1
- Codi typescript prompt HOT 8
- Codi crashes when coc.nvim is used to autocomplete HOT 2
- Codi runs on Insert mode after stopped with :Codi! on Neovimv0.6.0-dev. It should stop after stopped. HOT 1
- :Codi is not working HOT 1
- Wierd Behaviour: Codi logging Property Assignment HOT 1
- Partial output HOT 4
- Codi doesn't work with other plugins that use extmark. HOT 2
- [Feature] Support Golang
- Syncbind issues in vim 8
- function declaration hoisting HOT 2
- Cannot deactivate Codi HOT 2
- Screencast doesn't work HOT 1
- Codi Glitches out on Vim9
- Can't open Codi if [Nerd,Neo]Tree is open
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codi.vim.