summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorSencer Selcuk <sencerselcuk@gmail.com>2014-06-17 23:32:33 -0400
committerSencer Selcuk <sencerselcuk@gmail.com>2014-06-18 11:33:40 -0400
commit3827a1b09e1ae79b6ca79c5ae131f7e966226033 (patch)
treef9b4b049a59a5f371765bbf8a648428bb8f1a30b /install
parent61ba8d5a11fc1672d1601ae246817f9b3eb29404 (diff)
Use `command find` rather than plain `find`
Aliases are expanded in shell scripts, and one may have an alias for the `find` command that conflicts with fzf. So make sure fzf is using real find command rather than the alias.
Diffstat (limited to 'install')
-rwxr-xr-xinstall12
1 files changed, 6 insertions, 6 deletions
diff --git a/install b/install
index 9ed83b15..47bba472 100755
--- a/install
+++ b/install
@@ -98,7 +98,7 @@ EOF
# Key bindings
# ------------
__fsel() {
- find * -path '*/\.*' -prune \
+ command find * -path '*/\.*' -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | fzf -m | while read item; do
@@ -122,7 +122,7 @@ __fsel_tmux() {
__fcd() {
local dir
- dir=$(find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf +m) && printf 'cd %q' "$dir"
+ dir=$(command find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf +m) && printf 'cd %q' "$dir"
}
__use_tmux=0
@@ -174,7 +174,7 @@ EOFZF
# CTRL-T - Paste the selected file path(s) into the command line
__fsel() {
set -o nonomatch
- find * -path '*/\.*' -prune \
+ command find * -path '*/\.*' -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | fzf -m | while read item; do
@@ -207,7 +207,7 @@ bindkey '^T' fzf-file-widget
# ALT-C - cd into the selected directory
fzf-cd-widget() {
- cd "${$(set -o nonomatch; find * -path '*/\.*' -prune \
+ cd "${$(set -o nonomatch; command find * -path '*/\.*' -prune \
-o -type d -print 2> /dev/null | fzf):-.}"
zle reset-prompt
}
@@ -248,7 +248,7 @@ EOFZF
cat > ~/.config/fish/functions/fzf_key_bindings.fish << "EOFZF"
function fzf_key_bindings
function __fzf_select
- find * -path '*/\.*' -prune \
+ command find * -path '*/\.*' -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | fzf -m | while read item
@@ -283,7 +283,7 @@ function fzf_key_bindings
end
function __fzf_alt_c
- find * -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf +m > $TMPDIR/fzf.result
+ command find * -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf +m > $TMPDIR/fzf.result
if [ (cat $TMPDIR/fzf.result | wc -l) -gt 0 ]
cd (cat $TMPDIR/fzf.result)
end