Open sl5net opened 4 years ago
Hey,
Thanks for the suggestion this is something we would like to add to Pier, just haven't decided which route to go down for what kinda interface.
Here's a few two examples that I've been using if that helps you out:
Emacs (requires ivy, s.el, dash.el)
(defun pier-list-function ()
(s-lines (shell-command-to-string "pier ls -q")))
(defun pier-run-action (alias)
(shell-command
(format "pier run %s"
(shell-quote-argument
(substring alias 0 (string-match-p " " alias))))))
(defun pier-list-ivy ()
(interactive)
(ivy-read "Run pier script: " (pier-list-function)
:action 'pier-run-action))
Shell version, requires fzf
pier-fzy () {
pier ls -q | fzf --bind='enter:execute(pier show {})+abort,ctrl-e:execute(pier edit {}),ctrl-r:execute(pier run {} | less)'
}
Enough example of using pier
with fzf
. You can added this to your alias.
Hope this will be helpful.
pier_fzf() {
pier $(pier list | awk NR\>2 | fzf | awk '{print $1}')
}
may its a bit different concept. i possible please add to your to-do-list: add fuzzy search menu bolow. i tried to do something with https://github.com/sl5net/Lintalist4Linux thanks