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 499257c commit 4159ae2Copy full SHA for 4159ae2
scripts/bash_pinyin_completion
@@ -55,19 +55,16 @@ _pinyin_completion() {
55
if [[ "${compgen_opts[0]}" == -d ]]; then
56
mapfile -t pinyin_matched < <(
57
compgen -d -- |
58
- grep -v '^\.\{1,2\}$' | # Exclude . and ..
59
bash-pinyin-completion-rs "$basepart" 2>/dev/null
60
)
61
else
62
63
compgen -f -- |
64
while IFS= read -r line; do
65
- if [[ "$line" != "." && "$line" != ".." ]]; then # Exclude . and ..
66
- if [ -d "$line" ]; then
67
- printf "%s/\n" "${line%%/}"
68
- else
69
- printf "%s\n" "$line"
70
- fi
+ if [ -d "$line" ]; then
+ printf "%s/\n" "${line%%/}"
+ else
+ printf "%s\n" "$line"
71
fi
72
done | bash-pinyin-completion-rs "$basepart" 2>/dev/null
73
0 commit comments