summaryrefslogtreecommitdiff
path: root/scratch/rocker_example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scratch/rocker_example.lua')
-rw-r--r--scratch/rocker_example.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/scratch/rocker_example.lua b/scratch/rocker_example.lua
new file mode 100644
index 0000000..0e73114
--- /dev/null
+++ b/scratch/rocker_example.lua
@@ -0,0 +1,24 @@
+
+
+builtin.git_files = function(opts)
+ opts = opts or {}
+
+ opts.show_preview = get_default(opts.show_preview, true)
+
+ opts.finder = opts.finder or finders.new {
+ static = true,
+
+ fn_command = function()
+ return {
+ command = 'git',
+ args = {'ls-files'}
+ }
+ end,
+ }
+
+ opts.prompt = opts.prompt or 'Simple File'
+ opts.previewer = opts.previewer or previewers.cat
+ opts.sorter = opts.sorter or sorters.get_norcalli_sorter()
+
+ pickers.new(opts):find()
+end