m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

[zsh] emulate -L zsh to avoid issues with incompatible options

Close #858
This commit is contained in:
Junegunn Choi
2017-03-01 16:07:04 +09:00
parent c89ac341e4
commit 3a6af27586
2 changed files with 7 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ __fzf_generic_path_completion() {
tail=$6
fzf="$(__fzfcmd_complete)"
setopt localoptions nonomatch
setopt nonomatch
dir="$base"
while [ 1 ]; do
if [[ -z "$dir" || -d ${~dir} ]]; then
@@ -142,8 +142,8 @@ _fzf_complete_unalias() {
}
fzf-completion() {
emulate -L zsh
local tokens cmd prefix trigger tail fzf matches lbuf d_cmds
setopt localoptions noshwordsplit noksh_arrays
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags