From 8585be2072d0c85a214b91e208c81833831396b4 Mon Sep 17 00:00:00 2001 From: Ian Mancini Date: Fri, 4 Sep 2020 02:35:31 -0300 Subject: [PATCH] Simplify add project function --- project | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project b/project index 4117845..6aea21e 100755 --- a/project +++ b/project @@ -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