mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-09-29 05:39:01 +00:00
Avoid starting interactive bash (#34)
This commit is contained in:
parent
d83febea46
commit
77d45cb173
8
install
8
install
@ -89,7 +89,7 @@ export -f fzf > /dev/null
|
|||||||
|
|
||||||
# Auto-completion
|
# Auto-completion
|
||||||
# ---------------
|
# ---------------
|
||||||
$fzf_completion
|
[[ \$- =~ i ]] && $fzf_completion
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -98,8 +98,6 @@ EOF
|
|||||||
cat >> $src << "EOFZF"
|
cat >> $src << "EOFZF"
|
||||||
# Key bindings
|
# Key bindings
|
||||||
# ------------
|
# ------------
|
||||||
if [[ $- =~ i ]]; then
|
|
||||||
|
|
||||||
__fsel() {
|
__fsel() {
|
||||||
find * -path '*/\.*' -prune \
|
find * -path '*/\.*' -prune \
|
||||||
-o -type f -print \
|
-o -type f -print \
|
||||||
@ -110,6 +108,8 @@ __fsel() {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ $- =~ i ]]; then
|
||||||
|
|
||||||
__fsel_tmux() {
|
__fsel_tmux() {
|
||||||
local height
|
local height
|
||||||
height=${FZF_TMUX_HEIGHT:-40%}
|
height=${FZF_TMUX_HEIGHT:-40%}
|
||||||
@ -118,7 +118,7 @@ __fsel_tmux() {
|
|||||||
else
|
else
|
||||||
height="-l $height"
|
height="-l $height"
|
||||||
fi
|
fi
|
||||||
tmux split-window $height "bash -ci 'source ~/.fzf.bash; tmux send-keys -t $TMUX_PANE \"\$(__fsel)\"'"
|
tmux split-window $height "bash -c 'source ~/.fzf.bash; tmux send-keys -t $TMUX_PANE \"\$(__fsel)\"'"
|
||||||
}
|
}
|
||||||
|
|
||||||
__fcd() {
|
__fcd() {
|
||||||
|
Loading…
Reference in New Issue
Block a user