On 5/1/20 8:45 AM, kcrisman wrote: > > I don't know whether python functions can call the ! things but I > think it would help users to keep search_src(s) as a shorthand for > !grep -r s $SAGE_ROOT/src and search_def(s) for search_src("def "+s). > > > Thanks for more calmly and concisely making my point for me. > > As for a relevant xkcd: https://xkcd.com/1168/
If you don't start sage from $SAGE_ROOT, then having an alias is nice, but there's also a standard way to do that: $ alias search_src="cd $SAGE_ROOT/src/sage; grep -r" Now I can run whatever grep variant I want, easily, from anywhere: $ search_src -il orlitzky graphs graphs/generic_graph.py (And pipe the result to another command, if I want). Point is, we don't need to reimplement every fifty-year-old standard POSIX feature in python to make it "usable." The people who know how to use grep/alias far outnumber the people who know how to use sage's search_src(). The people who know neither need to learn one, and they're better off learning the reusable skill. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/c7dc3bdc-1334-3ec0-da13-e5c91a8b3510%40orlitzky.com.