Skip to content

Instantly share code, notes, and snippets.

@greyaperez
Last active May 2, 2018 14:24
Show Gist options
  • Save greyaperez/3aa403daec062a5c6ceb to your computer and use it in GitHub Desktop.
Save greyaperez/3aa403daec062a5c6ceb to your computer and use it in GitHub Desktop.
function research-ui () {
local results=($(grep -Iir \
--include='*.ts' \
--include='*.less' \
--include='*.scss' \
--include='*.css' \
--include='*.js' \
--include='*.html' \
--include='*.json' \
--exclude-dir='node' \
--exclude-dir='node_modules' \
--exclude-dir='target' \
--exclude-dir='generators' \
--exclude-dir='docs' \
--exclude-dir='build' \
--exclude-dir='apps' \
--exclude-dir='eclipse' \
--exclude-dir='test*' \
--exclude-dir='.*' \
$1 ./ | cut -d':' -f 1 | uniq))
for index in "${!results[@]}"
do
echo "${results[index]}" | sed -e "s/${PWD} --- /g"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment