Skip to content

Commit ed01af3

Browse files
committed
fix(_comp_realcommand): absolutize more in fallback case
1 parent a127550 commit ed01af3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bash_completion

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,15 @@ _comp_realcommand()
16781678
ret=$(readlink -f "$file")
16791679
else
16801680
ret=$file
1681+
if [[ $ret == */* ]]; then
1682+
if [[ $ret == ./* ]]; then
1683+
ret=$PWD/${file:2}
1684+
elif [[ $ret == ../* ]]; then
1685+
ret=$PWD/${file:3}
1686+
elif [[ $ret != /* ]]; then
1687+
ret=$PWD/$file
1688+
fi
1689+
fi
16811690
fi
16821691
}
16831692

0 commit comments

Comments
 (0)