mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
minor fixes
This commit is contained in:
parent
0359b5abae
commit
291073ba73
5 changed files with 10 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
function codewars_rust
|
||||
|
||||
if count $argv >/dev/null
|
||||
set -f kata_name (echo "$argv" | sed 's/[^A-Za-z0-9]/_/g' | tr '[:upper:]' '[:lower:]')
|
||||
set -f kata_name "codewars_"(snakecase $argv)
|
||||
set -f kata_date (date +%Y.%-m.%-d)
|
||||
mkdir -p ~/repos/codewars/Rust/"$argv"
|
||||
mkdir -p ~/repos/codewars/Rust/"$argv"/src
|
||||
|
|
|
|||
3
.config/fish/functions/snakecase.fish
Normal file
3
.config/fish/functions/snakecase.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function snakecase
|
||||
echo $argv | sed 's/ /_/g' | sed 's/[^A-Za-z0-9_]//g' | tr '[:upper:]' '[:lower:]'
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue