mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
feat: Adds new-proposal function
This commit is contained in:
13
zsh/config/functions/new-proposal
Executable file
13
zsh/config/functions/new-proposal
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/zsh
|
||||
|
||||
prefix=$(date '+%y.%m.%d')
|
||||
name=$(gum input --placeholder="Enter customer name...")
|
||||
|
||||
if [ -z "$name" ]; then
|
||||
echo "Name should not be blank." && exit 1
|
||||
fi
|
||||
|
||||
cleanedName="${name%% *}${name##* }"
|
||||
directory="$PROPOSALS/$prefix.$cleanedName"
|
||||
mkdir "$directory"
|
||||
echo "$directory"
|
||||
Reference in New Issue
Block a user