3 ms·
Curly brace expansion is one of the most useful and overlooked topic in these kind of posts. And I'm always surprised it isn't mentioned with compiling. g++ -o
by godelski 9y ago
Curly brace expansion is one of the most useful and overlooked topic in these kind of posts. And I'm always surprised it isn't mentioned with compiling.
g++ -o foo{,.cpp}
- tych0 9y agoWorth noting that for the particular case you've cited, you can just use make, even without a makefile: ~ cat test.cpp #include <iostream> using namespace std; int main() { cout << "hi\n"; return 0; } ~ stat Makefile stat: cannot stat 'Makefile': No such file or directory ~ 1 make test g++ test.cpp -o test ~ ./test hi
- skykooler 9y agoalso, useful to know - zsh supports tab-completion for curly brace expansion.