Skip to content

Commit

Permalink
[Alfred] Add support for free input text (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro authored Apr 26, 2020
1 parent 0015d31 commit ead1323
Show file tree
Hide file tree
Showing 11 changed files with 435 additions and 116 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ An interactive cheatsheet tool for the command-line and application launchers.

It uses [fzf](https://github.com/junegunn/fzf), [skim](https://github.com/lotabout/skim), or [Alfred](https://www.alfredapp.com/) under the hood and it can be either used as a command or as a shell widget (*à la* Ctrl-R).

![Alfred demo](https://user-images.githubusercontent.com/3226564/79696281-35d06380-8252-11ea-87d5-dc619d869e81.gif)
![Alfred demo](https://user-images.githubusercontent.com/3226564/80294838-582b1b00-8743-11ea-9eb5-a335d8eed833.gif)

Table of contents
-----------------
Expand Down
8 changes: 8 additions & 0 deletions alfred/alfred0.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -n "${snippet:-}" ]; then
source "${HOME}/.bashrc"
echo -n "$(navi alfred check)"
else
echo -n "__start"
fi
File renamed without changes.
3 changes: 1 addition & 2 deletions alfred/alfred2.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

source "${HOME}/.bashrc"

if [ -n "${varname:-}" ]; then
source "${HOME}/.bashrc"
echo -n "$(navi alfred transform)"
else
echo -n "$snippet"
Expand Down
7 changes: 7 additions & 0 deletions alfred/alfred3.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

case "${snippet:-}" in
*docker*|*osascript*|*Finder*|*open*) exit 0 ;;
esac

printf "terminal"
File renamed without changes
Loading

0 comments on commit ead1323

Please sign in to comment.