[Fish] Remove unused fish functions
This commit is contained in:
parent
92eaa4e194
commit
6c030a639a
@ -1,31 +0,0 @@
|
||||
function cnew -d "Create new C11 project"
|
||||
if count $argv > /dev/null
|
||||
set projname ""
|
||||
for item in $argv
|
||||
switch "$item"
|
||||
case -h --help
|
||||
man ~/dev/fishfunctions/cnew.man
|
||||
return 0
|
||||
case '*'
|
||||
set projname $item
|
||||
end
|
||||
end
|
||||
if [ "$projname" = "" ]
|
||||
echo "Missing argument: PROJECT"
|
||||
return -1
|
||||
end
|
||||
cp -r ~/dotfiles/dev/templateC $argv[1]
|
||||
cd $argv[1]
|
||||
sed -i "s/PROJECTNAME/$argv[1]/g" CMakeLists.txt
|
||||
sed -i "s/PROJECTNAME/$argv[1]/g" README.org
|
||||
sed -i "s/CPROJECTNAME/$argv[1]/g" doc/Doxyfile
|
||||
git init
|
||||
git add .
|
||||
git commit -m "initial commit"
|
||||
cd ..
|
||||
else
|
||||
echo "Missing argument: PROJECT"
|
||||
return -1
|
||||
end
|
||||
end
|
||||
complete -c cppnew -s h -l help -d 'Print Help'
|
@ -1,49 +0,0 @@
|
||||
function cppnew -d "Create new C++17 project" --argument-names 'projectname'
|
||||
if count $argv > /dev/null
|
||||
set conanproj "false"
|
||||
set projname ""
|
||||
set conanprojname ""
|
||||
for item in $argv
|
||||
switch "$item"
|
||||
case -c --conan
|
||||
set conanproj "true"
|
||||
set conanprojname $value
|
||||
case -h --help
|
||||
man ~/dev/fishfunctions/cppnew.man
|
||||
return 0
|
||||
case '*'
|
||||
set projname $item
|
||||
end
|
||||
end
|
||||
if [ "$projname" = "" ]
|
||||
if [ "$conanprojname" = "" ]
|
||||
echo "Missing argument: PROJECT"
|
||||
return -1
|
||||
end
|
||||
end
|
||||
if [ "$projname" = "" ]
|
||||
set projname $conanprojname
|
||||
end
|
||||
if [ "$conanproj" = "true" ]
|
||||
cp -r ~/dotfiles/dev/conan-project $projname
|
||||
else
|
||||
cp -r ~/dotfiles/dev/templateC++ $projname
|
||||
end
|
||||
cd $projname
|
||||
sed -i "s/PROJECTNAME/$projname/g" README.org
|
||||
sed -i "s/PROJECTNAME/$projname/g" CMakeLists.txt
|
||||
if [ "$conanproj" = "true" ]
|
||||
sed -i "s/PROJECTNAME/$projname/g" conanfile.py
|
||||
end
|
||||
sed -i "s/CPPPROJECTNAME/$projname/g" doc/Doxyfile
|
||||
git init
|
||||
git add .
|
||||
git commit -m "initial commit"
|
||||
cd ..
|
||||
else
|
||||
echo "Missing argument: PROJECT"
|
||||
return -1
|
||||
end
|
||||
end
|
||||
complete -c cppnew -s c -l conan -d 'Conan Project'
|
||||
complete -c cppnew -s h -l help -d 'Print Help'
|
@ -1,4 +0,0 @@
|
||||
function mkcd -d "Create directory and cd to it"
|
||||
mkdir -p $argv[1]
|
||||
cd $argv[1]
|
||||
end
|
@ -1,22 +0,0 @@
|
||||
function rainymood
|
||||
set volume 50
|
||||
getopts $argv | while read -l key option
|
||||
switch $key
|
||||
case v
|
||||
set volume $option
|
||||
case volume
|
||||
set volume $option
|
||||
end
|
||||
end
|
||||
if [ "$volume" != "" ]
|
||||
set FILE (math (random) % 4)
|
||||
set URL "https://rainymood.com/audio1112/$FILE.ogg"
|
||||
mpv $URL --force-window=no --volume=$volume; and rainymood
|
||||
else
|
||||
echo "Missing value after -v/--volume option."
|
||||
echo "Usage example:"
|
||||
printf "\trainymood -v50\n\trainymood --volume 50\n"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
complete -c rainymood -s v -l volume -d 'Volume of the rain (0-100)'
|
Loading…
Reference in New Issue
Block a user