mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 01:52:31 +01:00
Added Cmaker plugin
This commit is contained in:
parent
a3c579bf27
commit
13373e0e92
3 changed files with 80 additions and 0 deletions
49
plugins/Cmaker/Cmaker.plugin.zsh
Normal file
49
plugins/Cmaker/Cmaker.plugin.zsh
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
alias cjump="nvim $(mdfind -onlyin . -name 'main' | grep -A 1 /Users)"
|
||||
|
||||
alias clist="mdfind -onlyin . -interpret .cpp & mdfind -onlyin . -interpret .cc"
|
||||
|
||||
function cgen(){
|
||||
mkdir $1
|
||||
cd $1
|
||||
touch CMakeLists.txt
|
||||
cat ~/.oh-my-zsh/custom/plugins/cMaker/ListTemplate.txt >> CMakeLists.txt
|
||||
mkdir src
|
||||
cd src
|
||||
touch main.cpp
|
||||
cd ../..
|
||||
}
|
||||
|
||||
function crun(){
|
||||
#VAR=${1:-.}
|
||||
cd $1
|
||||
cmake .
|
||||
cmake --build .
|
||||
}
|
||||
|
||||
function cbin(){
|
||||
cbuild CPP
|
||||
cat $1 >> CPP/src/main.cpp
|
||||
crun CPP
|
||||
mv cpc ../
|
||||
cd ..
|
||||
rm -r CPP
|
||||
}
|
||||
|
||||
function cput(){
|
||||
mv $1/*(DN) $2/
|
||||
}
|
||||
|
||||
function ccomp(){
|
||||
cbuild qwertyu
|
||||
cd qwertyu/src
|
||||
rm main.cpp
|
||||
cd ../..
|
||||
mv $1/*(DN) qwertyu/src/
|
||||
crun qwertyu
|
||||
mv cpc ../
|
||||
rm -r qwertyu
|
||||
}
|
||||
|
||||
function ctemp(){
|
||||
open ~/.oh-my-zsh/custom/plugins/cMaker/ListTemplate.txt
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue