Skip to content

Commit 1b87824

Browse files
committed
Export IFS variable
This avoids having to set it again every time.
1 parent a040af8 commit 1b87824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/tpipeline.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func tpipeline#fork_job()
173173
let s:restore_left = systemlist("sh -c 'echo \"\"; tmux display-message -p \"#{status-left}\"'")[-1]
174174
let s:restore_right = systemlist("sh -c 'echo \"\"; tmux display-message -p \"#{status-right}\"'")[-1]
175175
endif
176-
let script = printf("while IFS='$\\n' read -r l; do echo \"$l\" > '%s'", s:tpipeline_filepath)
176+
let script = printf("export IFS='$\\n'; while read -r l; do echo \"$l\" > '%s'", s:tpipeline_filepath)
177177
if g:tpipeline_usepane
178178
" end early if file was truncated so as not to overwrite any titles of panes we may switch to
179179
let script .= "; if [ -z \"$l\" ]; then continue; fi"
@@ -190,7 +190,7 @@ func tpipeline#fork_job()
190190
endif
191191
endif
192192
if g:tpipeline_split
193-
let script .= printf("; IFS='$\\n' read -r r; echo \"$r\" > '%s'", s:tpipeline_right_filepath)
193+
let script .= printf("; read -r r; echo \"$r\" > '%s'", s:tpipeline_right_filepath)
194194
endif
195195
if g:tpipeline_usepane
196196
let script .= "; tmux select-pane -T \"#[fill=${C:3}]#[align=left]$l#[align=right]$r\""

0 commit comments

Comments
 (0)