Skip to content

fix: preserve multiline snippets in fish by clearing IFS locally#1032

Open
leoraclet wants to merge 1 commit into
denisidoro:masterfrom
leoraclet:fix-fish-shell-widget
Open

fix: preserve multiline snippets in fish by clearing IFS locally#1032
leoraclet wants to merge 1 commit into
denisidoro:masterfrom
leoraclet:fix-fish-shell-widget

Conversation

@leoraclet

@leoraclet leoraclet commented Jul 13, 2026

Copy link
Copy Markdown

Problem

When using the latest up-to-date widget in Fish shell, multi-line input is rendered as a single line instead of preserving line breaks.

Fix

Declare a local empty IFS before capturing the output of navi.

Without this, Fish splits multiline command substitutions into a list, causing commandline --replace to flatten the snippet into a single line.

Using a local empty IFS preserves the multiline output while keeping the change scoped to _navi_smart_replace.

Declare a local empty IFS before capturing the output of `navi`.

Without this, Fish splits multiline command substitutions into a list,
causing `commandline --replace` to flatten the snippet into a single line.

Using a local empty IFS preserves the multiline output while keeping the
change scoped to `_navi_smart_replace`.
@leoraclet
leoraclet requested a review from denisidoro as a code owner July 13, 2026 15:13
@welcome

welcome Bot commented Jul 13, 2026

Copy link
Copy Markdown

Thanks for opening this pull request!

@jackandroselv

jackandroselv commented Jul 13, 2026 via email

Copy link
Copy Markdown

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

Successfully merging this pull request may close these issues.

2 participants