We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a30032c commit 5f819ecCopy full SHA for 5f819ec
scripts/bash_pinyin_completion
@@ -30,9 +30,15 @@ _pinyin_completion() {
30
# ignore empty
31
[ -z "$cur" ] && return
32
33
+ _expand || return 0
34
- local dirpart="$(dirname -- "$cur")"
35
- local basepart="$(basename -- "$cur")"
+ if [[ "${cur:0:1}" == "'" || "${cur:0:1}" == "\"" ]]; then
36
+ local dirpart="$(dirname -- "${cur:1}")"
37
+ local basepart="$(basename -- "${cur:1}")"
38
+ else
39
+ local dirpart="$(dirname -- "$cur")"
40
+ local basepart="$(basename -- "$cur")"
41
+ fi
42
43
# realpath resolve current path as ".", if user did not enter "./" then ignore.
44
[[ "$dirpart" == "." && "${cur:0:2}" != "./" ]] && dirpart=""
0 commit comments