Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This reverts commit 3a6af27586c65bb9243c5af7c43a40619503db52.

authored by Junegunn Choi · committed by Junegunn Choi · parent c387689 · Browse files · 2 files+4 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−7 removed

  • other:+4 added−7 removed

2 files+4 added−7 removed

modified:shell/completion.zsh+2 added-2 removed
modified:shell/key-bindings.zsh+2 added-5 removed
25 unmodified lines
26 echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf"27}2829fzf-file-widget() {30 emulate -L zsh30 LBUFFER="${LBUFFER}$(__fsel)"31 local ret=$?32 zle redisplay33 typeset -f zle-line-init >/dev/null && zle zle-line-init
3 unmodified lines
37bindkey '^T' fzf-file-widget3839# ALT-C - cd into the selected directory40fzf-cd-widget() {42 emulate -L zsh43 setopt pipefail 2> /dev/null41 local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \42 -o -type d -print 2> /dev/null | cut -b3-"}"43 setopt localoptions pipefail 2> /dev/null44 local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)"45 if [[ -z "$dir" ]]; then46 zle redisplay47 return 0
8 unmodified lines
56bindkey '\ec' fzf-cd-widget5758# CTRL-R - Paste the selected command from history into the command line59fzf-history-widget() {62 emulate -L zsh63 setopt pipefail 2> /dev/null60 local selected num61 setopt localoptions noglobsubst pipefail 2> /dev/null62 selected=( $(fc -l 1 |63 FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS --tac -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(q)LBUFFER} +m" $(__fzfcmd)) )64 local ret=$?65 if [ -n "$selected" ]; then
13 unmodified lines