Skip to content

Instantly share code, notes, and snippets.

@fgrsnau
Created May 4, 2017 12:23
Show Gist options
  • Save fgrsnau/3dc371ea37d2b19e731f7d9aa8c397b1 to your computer and use it in GitHub Desktop.
Save fgrsnau/3dc371ea37d2b19e731f7d9aa8c397b1 to your computer and use it in GitHub Desktop.
dmenu fuzzy files
#!/bin/bash
set -eu -o pipefail
(
if [[ -e .git ]]; then
git ls-files -co
else
find -type f -printf '%P\n'
fi
) | dmenu -p 'Fuzzy File:' -i -l 10
function! FuzzyFile()
let g:FuzzyFileLast=system('dmenu_find')
execute ':e ' . g:FuzzyFileLast
endfunction
command FuzzyFile call FuzzyFile()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment