Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tilde home directory auto completion and spaces in directories #1613

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

jwater7
Copy link
Contributor

@jwater7 jwater7 commented Apr 23, 2024

taskfile specified with ~ are not expanding properly so -f check is failing.
taskfile with "some path/that has paces/Taskfile.yml" does not work because it is being double quoted

and if you want to preserve behavior for parent dir searches, we could also add this snip:

+    local curdir

     cmd=(task)
     taskfile=${(Qv)opt_args[(i)-t|--taskfile]}
@@ -19,12 +20,17 @@ function __task_list() {
         enabled=1
         cmd+=(--taskfile "$taskfile")
     else
+      curdir=`pwd`
+      while [ "$enabled" -eq 0 -a `pwd` != '/' ]; do
         for taskfile in {T,t}askfile{,.dist}.{yaml,yml}; do
             if [[ -f "$taskfile" ]]; then
                 enabled=1
                 break
             fi
         done
+        cd ..

@andreynering andreynering added the area: completions Changes related to shell completions and scripts. label Apr 24, 2024
@andreynering
Copy link
Member

Thanks @jwater7!

@andreynering andreynering enabled auto-merge (squash) April 24, 2024 01:57
@andreynering andreynering merged commit fa022be into go-task:main Apr 24, 2024
13 checks passed
andreynering added a commit that referenced this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: completions Changes related to shell completions and scripts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants