Skip to content
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

[BUG] TermExec doesn't work with config.shell = function #466

Closed
1 task done
asror1 opened this issue Jul 31, 2023 · 1 comment
Closed
1 task done

[BUG] TermExec doesn't work with config.shell = function #466

asror1 opened this issue Jul 31, 2023 · 1 comment

Comments

@asror1
Copy link
Contributor

asror1 commented Jul 31, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I when trying to use TermExec cmd="some command" I am faced with the following error:
image
And what ends up happening is the command is not executed.

Expected Behavior

When using config.shell = function, the TermExec should not throw an error, and instead execute the passed in cmd as normal.

Steps To Reproduce

  1. In any buffer
  2. With the following minimal config:
require("toggleterm").setup({
  shell = function()
    return vim.o.shell
  end,
})
  1. Run the following command :TermExec cmd="echo test"
  2. And you should see the following error...
    image

Environment

- OS: Windows 10
- neovim version: 
NVIM v0.8.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3        
Compiled by runneradmin@fv-az28-353
- Shell: pwsh

Anything else?

I believe this is an easy fix. If I'm not mistaken it comes from using a function for the shell option in the config. I will be submitting a fix PR for this for review.

@akinsho
Copy link
Owner

akinsho commented Aug 2, 2023

fixed by #467

@akinsho akinsho closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants