first commit
This commit is contained in:
commit
0610f4aeab
130 changed files with 9897 additions and 0 deletions
12
fn/-z4h-sanitize-word-prefix
Normal file
12
fn/-z4h-sanitize-word-prefix
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
() {
|
||||
emulate -L zsh -o extended_glob
|
||||
[[ $_z4h_word_prefix != *('$'|'\') ]] || return
|
||||
if [[ $_z4h_word_prefix == *[A-Z]* ]]; then
|
||||
[[ -z ${(@)*:#$_z4h_word_prefix*} ]] || return
|
||||
else
|
||||
[[ -z ${(@)*:#(#i)$_z4h_word_prefix*} ]] || return
|
||||
fi
|
||||
} "$@" || _z4h_word_prefix=
|
||||
_z4h_word_prefix=${_z4h_word_prefix// /\\ }
|
Loading…
Add table
Add a link
Reference in a new issue