1. Shrikant Sharat Kandula
  2. n-nake

Commits

Shrikant Sharat Kandula  committed 27c7faa

Don't `shift` when no task is given.

  • Participants
  • Parent commits 9ac00ed
  • Branches default

Comments (0)

Files changed (1)

File n.sh

View file
  • Ignore whitespace
 n () {
 
     # Load the given task from first argument, or the default-task
-    task="${1:-default-task}"
-    shift
+    task="default-task"
+    if [[ ! -z "$1" ]]; then
+        task=$1
+        shift
+    fi
 
     # Find the project directory.
     project_dir="$PWD"