diff options
| author | Daniel Mensinger <daniel@mensinger-ka.de> | 2025-02-04 13:37:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 13:37:02 +0100 |
| commit | db32c6ccce91e0b36873c8bfccd1e40f452a2060 (patch) | |
| tree | 70f86e46cf274d27d5343a873a5576d29ef4fc13 /plugins/mvn | |
| parent | 2b547d113b7e55a556b695c9372f1beb721efd67 (diff) | |
| download | zsh-db32c6ccce91e0b36873c8bfccd1e40f452a2060.tar.gz zsh-db32c6ccce91e0b36873c8bfccd1e40f452a2060.tar.bz2 zsh-db32c6ccce91e0b36873c8bfccd1e40f452a2060.zip | |
fix(mvn): handle directories in `<relativePath>` (#12957)
Diffstat (limited to 'plugins/mvn')
| -rw-r--r-- | plugins/mvn/mvn.plugin.zsh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index a569a87fa..7bffce36e 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -101,8 +101,14 @@ function listMavenCompletions { new_file="../pom.xml" fi - # if file doesn't exist break file="${file:h}/${new_file}" + + # if the file points to a directory, assume it is a pom.xml in that directory + if [[ -d "$file" ]]; then + file="${file}/pom.xml" + fi + + # if file doesn't exist break if ! [[ -e "$file" ]]; then break fi |
