I am trying to make an alias called File Search (fs) for short. That takes one argument (search term). It then searches down the directory tree for that using grep.
Example:
fs ‘function my_function()’
What am I doing wrong?
alias fs='grep -R "$1" .'
What you tried would search the current directory itself, not the files in it, and certainly not the files in its subdirectories. You want something like this (from memory, I’m not at a Unix machine right now):