Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

When $PWD contains colon, completions for Makefile become broken.



I found zsh suddenly cannot complete targets of Makefile at current $PWD, so I digged into the source code

https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_make

And found this line:
```
  basedir=${(j./.)${${~"${(@s.:.):-$PWD:${(Q)${opt_args[-C]:-$opt_args[--directory]}//\\:/$nul}}"}[(R)/*,cdir]}//$nul/:}
  # I added the following two lines for debugging 
  echo "[DEBUG] PWD == $PWD"
  echo "[DEBUG] basedir == $basedir"
```

 I added the two `echo` for debugging, and it outputs:

```
[DEBUG] PWD == /home/user/workspace/_obs/home:username/packagename
[DEBUG] basedir == /home/user/workspace/_obs/home/username/packagename/
```

The reason seems to be that the $PWD contains a colon (`:`). However, in Open Build Service (a service provided by openSUSE), its CLI command `osc` always creates lots of folders whose name containing colons in localhost (it's the naming rule of Open Build Service).

I also tried to look into this line for a fix, but I found I don't sure why it processed PWD in such way on purpose, so I think I should report a bug to the original developers first instead of making a patch for it.


Messages sorted by: Reverse Date, Date, Thread, Author