GG

GG() # Case-insensitive, Wildcards disabled
{
  local SEARCH_STRING
  if [[ "$*" == "" ]]; then
    read -p "Type a search string: " SEARCH_STRING # Because bash is shit!
    history -s GG "'"${SEARCH_STRING//\'/\'\"\'\"\'}"'" # Shit!
  else
    SEARCH_STRING="$*"
  fi
  grep -RFIn --color=always "$SEARCH_STRING" . | cut -c1-1000
}

Leave a Reply

*