Skip to content

Commit

Permalink
Merge pull request #335 from ppcamp/feature/fzf_extra_examples
Browse files Browse the repository at this point in the history
docs: add example of fzf history use case
  • Loading branch information
RamiAwar authored Dec 8, 2024
2 parents 0e634f0 + 48e47df commit c15625d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,24 @@ By using `pbcopy` on OS X, you can copy snippets to clipboard.

<img src="doc/pet06.gif" width="700">

## Allow to register from history when using fzf

Just export this to your `.bashrc` or `.zshrc` file. This will show your history
as default (when using fzf) and it also binds the `alt+s` key combination
to allow you to search and save some previous used command command.

```
export FZF_CTRL_R_OPTS="
--reverse
--cycle
--info=right
--color header:italic
--header 'alt+s (pet new)'
--preview 'echo {}' --preview-window down:3:hidden:wrap
--bind '?:toggle-preview'
--bind 'alt-s:execute(pet new --tag {2..})+abort'"
```

# Features

## Edit snippets
Expand Down

0 comments on commit c15625d

Please sign in to comment.