File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11
11
fi
12
12
13
13
# 63<&0 :: sends stdin 0 to stdin 63
14
- # sed </dev/fd/63 -e "s/'$'\x1b'']8;;file:[^\]*[\]//g" -e "/^ *\$/d" :: reads stdin 63, remove graphics and remove any empty lines at end of file
14
+ # sed </dev/fd/63 :: reads stdin 63
15
+ # -e "s/'$'\x1b'']8;;file:[^\]*[\]//g" :: removes graphics
16
+ # -e :a -e "/^\n*\$/{\$d;N;ba" -e "}" :: removes empty lines, source: https://unix.stackexchange.com/questions/552188/how-to-remove-empty-lines-from-beginning-and-end-of-file
15
17
# sleep 0.01 :: waits for the command to complete
16
18
# printf "'$'\x1b'']2;" :: removes [Process exited 0] from display
17
19
exec nvim 63< & 0 0< /dev/null \
@@ -23,4 +25,5 @@ exec nvim 63<&0 0</dev/null \
23
25
-c " set scrollback=100000 laststatus=0" \
24
26
-c " autocmd TermEnter * stopinsert" \
25
27
-c " autocmd TermClose * ${AUTOCMD_TERMCLOSE_CMD} " \
26
- -c ' terminal sed </dev/fd/63 -e "s/' $' \x1b ' ' ]8;;file:[^\]*[\]//g" -e "/^ *\$/d" && sleep 0.01 && printf "' $' \x1b ' ' ]2;"'
28
+ -c ' terminal sed </dev/fd/63 -e "s/' $' \x1b ' ' ]8;;file:[^\]*[\]//g" -e :a -e "/^\n*\$/{\$d;N;ba" -e "}" && sleep 0.01 && printf "' $' \x1b ' ' ]2;"'
29
+
You can’t perform that action at this time.
0 commit comments