Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save slimlime/95742b8f04d607235de2b6c51d0a1ea0 to your computer and use it in GitHub Desktop.

Select an option

Save slimlime/95742b8f04d607235de2b6c51d0a1ea0 to your computer and use it in GitHub Desktop.
Redirect | and wrap output with a prefix/suffix script example.
# /*
# * @Author: slimlime
# * @Date: 2018-07-01 15:23:12
# * @Last Modified by: slimlime
# * @Last Modified time: 2018-07-01 15:23:12
# */
# ^^Should probably revamp some of these auto-generator extensions^^.
# // Convenience utility to wrap a string in prefix suffix. e.g. "string", to populate a string[] for my JSON settings.
ls | sed 's/.*/"&",/'
# // § Or for those single-quoters, replace the " with ' and vice versa. - Had trouble with escaping quote chars in some other cmd tools
# ./code-insiders.cmd --list-extensions | sed "s/.*/\'&\',/" # Generate the formatted list of extensions using the installed vs code bin.
# /*
# * @Author: slimlime
# * @Date: 2018-07-01 15:23:12
# * @Last Modified by: slimlime
# * @Last Modified time: 2018-07-01 15:23:12
# */
# ^^Should probably revamp some of these auto-generator extensions^^.
# // Convenience utility to wrap a string in prefix suffix. e.g. "string", to populate a string[] for my JSON settings.
ls | sed 's/.*/"&",/'
# // § Or for those single-quoters
./code-insiders.cmd --list-extensions | sed "s/.*/\'&\',/" # Generate the formatted list of extensions using the installed vs code bin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment