Skip to content

Commit 737c95c

Browse files
committed
fix: parse ~ correctly
Signed-off-by: wxiwnd <[email protected]>
1 parent 017e823 commit 737c95c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/bash_pinyin_completion

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ _comp_compgen__call_builtin() {
4141

4242
# Function to add completion results
4343
_add_completion() {
44+
local cur
45+
46+
eval "cur=${_cur}"
47+
4448
# Check if we have the necessary variables
4549
if [[ -z "${_cur-}" ]] || [[ -z "${_var-}" ]]; then
4650
return
4751
fi
4852

49-
local cur="$_cur"
5053
local var_name="$_var"
5154

5255
# Skip empty

0 commit comments

Comments
 (0)