Skip to content

Commit feca84c

Browse files
committed
fix: ignore './' while user didn't specify
Signed-off-by: wxiwnd <wxiwnd@outlook.com>
1 parent 6d264f1 commit feca84c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/bash_pinyin_completion

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ _pinyin_completion() {
3434
local dirpart="$(dirname -- "$cur")"
3535
local basepart="$(basename -- "$cur")"
3636

37-
[[ "$dirpart" == "." && "$cur" != */* ]] && dirpart=""
37+
# realpath resolve current path as ".", if user did not enter "./" then ignore.
38+
[[ "$dirpart" == "." && "${cur:0:2}" != "./" ]] && dirpart=""
3839

3940
local savedPWD="$PWD"
4041
local resolved_dir

0 commit comments

Comments
 (0)