dotfiles

Author: Kyle Fuller <kyle@fuller.li> 2017-12-13 23:00:06 -0800 -0800
Committer: Kyle Fuller <kyle@fuller.li> 2017-12-13 23:00:06 -0800 -0800
Commit: 03914adcb4db9cd6b5d8a661e4df6e8709a49fe0
Parent: 725a1ed9af3bf6a341eff48e74b4c38c055a9d67


refactor(p): Allow passing prefill query to fzf
diff --git a/.config/fish/functions/p.fish b/.config/fish/functions/p.fish
index a7b3781e543f3b8069e2bb3b93e66f4a52d4a44e..9fb5c33088dd6e8ff14fd648769321930c272678 100644
--- a/.config/fish/functions/p.fish
+++ b/.config/fish/functions/p.fish
@@ -1,5 +1,4 @@
 function p
   # Jump into a selected project from `~/Projects`
-  find ~/Projects -type d -maxdepth 2 -depth 2 -print | cut -d '/' -f5,6 | fzf > $TMPDIR/fzfp.result
-  cd ~/Projects/(cat $TMPDIR/fzfp.result)
+  cd ~/Projects/(find ~/Projects -type d -maxdepth 2 -depth 2 -print | cut -d '/' -f5,6 | fzf -q "$argv[1]")
 end