Skip to content

Commit

Permalink
feat: allow for selectors other than fzf
Browse files Browse the repository at this point in the history
* use selector instead of just fzf
  • Loading branch information
adamtabrams committed Jan 23, 2021
1 parent 8881b41 commit 2ea70c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2021-01-22
### Added
- Allow users to set a selector other than fzf using the SELECTOR environment variable.

## [0.3.1] - 2020-06-12
### Fixed
- Make git commands quiet.
Expand All @@ -24,7 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created a script with the basic functionality.

[Unreleased]: https://github.com/adamtabrams/ideas/compare/0.3.1...HEAD
[Unreleased]: https://github.com/adamtabrams/ideas/compare/0.4.0...HEAD
[0.4.0]: https://github.com/adamtabrams/ideas/compare/0.3.1...0.4.0
[0.3.1]: https://github.com/adamtabrams/ideas/compare/0.3.0...0.3.1
[0.3.0]: https://github.com/adamtabrams/ideas/compare/0.2.0...0.3.0
[0.2.0]: https://github.com/adamtabrams/ideas/compare/0.1.0...0.2.0
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ That way your notes will stay backed up and access.

* Install fzf if you don't already have it
* For MacOS: `brew install fzf`
* If you prefer to use skim, put `export SELECTOR="sk"` in your shell's config file.

* Clone this repo and your private repo.
* `git clone https://github.com/you/private-repo.git`
Expand Down
3 changes: 2 additions & 1 deletion ideas
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

data="${XDG_DATA_HOME:-$HOME/.local/share}/ideas"
data_repo="$data/repo"
selector=${SELECTOR:-fzf --reverse}

usage() {
echo "usage: ideas [COMMAND] [ARGS]"
Expand Down Expand Up @@ -29,7 +30,7 @@ select_idea() {
repo=$1
find "$repo" -depth 1 -name "*.md" -print0 |
xargs -n 1 -0 basename -s .md |
fzf +m --reverse
$selector --no-multi
}

rm_idea() {
Expand Down

0 comments on commit 2ea70c8

Please sign in to comment.