Giter Site home page Giter Site logo

Comments (8)

J-Kappes avatar J-Kappes commented on August 15, 2024 1

I found another workaround. Add the following line before vim.fn.termopen:

  vim.cmd("let &shell='/bin/sh'")

I tried executing a Nushell specific command from within the scrollback afterward and it still worked, i.e. setting that variable doesn't affect which shell gets used interactively.

from kitty-scrollback.nvim.

J-Kappes avatar J-Kappes commented on August 15, 2024 1

The new release works for me, no problem ๐ŸŽ‰

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

Hey @J-Kappes thanks for the issue and workaround. I'll take a look into this ๐Ÿ‘ I have had some issues before with other shell (fish) compatibility around those as well. I think I need to have a more generalized approach

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

Reproduced:

brew install nushell
echo '/opt/homebrew/bin/nu' >> /etc/shells
chsh -s /opt/homebrew/bin/nu

==============================================================================
kitty-scrollback.nvim

ERROR: failed to execute remote Kitty command

*entrypoint:* |termopen()| |::| |exit_code| |~=| |0| 
*command:* kitty @ get-text --match="id:1" --ansi --clear-selection --add-cursor --extent=all | sed -E -e 's/๏ฟฝ\[\?25.๏ฟฝ\[.*;.*H๏ฟฝ\[.*//g' -e 's/$/๏ฟฝ[0m/g'  && kitty +runpy 'sys.stdout.flush()' && printf '๏ฟฝ]2;'
*channel_id:* 3
*code:* 1
*stdout:*

  Error: nu::parser::shell_andand
    ร— The '&&' operator is not supported in Nushell
     โ•ญโ”€[source:1:1]
   1 โ”‚ kitty @ get-text --match="id:1" --ansi --clear-selection --add-cursor --extent=all | sed -E -e 's/[\?25.[.*;.*H[.*//g' -e 's/$//g'  && kitty +runpy 'sys.stdout.flush()' && printf '๏ฟฝ]2;'
     ยท                                                                                                                                           โ”€โ”ฌ
     ยท                                                                                                                                            โ•ฐโ”€โ”€ instead of '&&', use ';' or 'and'
     โ•ฐโ”€โ”€โ”€โ”€
    help: use ';' instead of the shell '&&', or 'and' instead of the boolean '&&'

*stderr:*
  <none>

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

I found another workaround. Add the following line before vim.fn.termopen:

  vim.cmd("let &shell='/bin/sh'")

I tried executing a Nushell specific command from within the scrollback afterward and it still worked, i.e. setting that variable doesn't affect which shell gets used interactively.

Ohhh that is very clever! I think I may use that. Thanks for the share!

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

๐ŸŽ‰ This issue has been resolved in version 2.1.2 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

Hey @J-Kappes, I just merged the approach of overriding shell. Thanks for the recommendation, let me know if this works or if you have any other issues.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

The new release works for me, no problem ๐ŸŽ‰

awesome, thanks for looking into it ๐Ÿ‘

from kitty-scrollback.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.