Simplify add project function

main
Ian Mancini 4 years ago
parent a8c7a7d1ea
commit 8585be2072

@ -14,6 +14,7 @@ arguments, it will launch fzf so you can select one.
Options:
-a [dir] Add a new project. Defaults to current dir
-r Remove project from projects. (select with fzf)
-l List projects
-h Print this message
EOF
}
@ -38,7 +39,7 @@ add_project() {
exit 1
fi
sed -i "$ a $NEW_PROJECT_DIR" "$PROJECTS_FILE"
echo "$NEW_PROJECT_DIR" >> "$PROJECTS_FILE"
if [ $? == 0 ]; then
echo "Info: added successfully"
exit 0

Loading…
Cancel
Save