12th April 2022
Computer Science⚑
GNULinux⚑
Basics⚑
-
New: Get command output or default value if emtpy.
echo | sed 's/^$/default value/'
neovim⚑
-
New: Search for visual selection.
To use the mapping, visually select the characters that are wanted in the search, then typevnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
//
to search for the next occurrence of the selected text.
sed⚑
-
New: Use matched pattern.
echo "foobarbaz" | sed 's/^foo\(.*\)baz$/\1/'
Returns
bar
.