m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 09:03:43 -05:00

Updated Examples (markdown)

Junegunn Choi
2015-02-19 12:15:46 +09:00
parent fb3889c506
commit 3e59184f3d

@@ -1,5 +1,4 @@
Opening files ### Opening files
-------------
```sh ```sh
# fe [FUZZY PATTERN] - Open the selected file with the default editor # fe [FUZZY PATTERN] - Open the selected file with the default editor
@@ -19,8 +18,7 @@ fo() {
} }
``` ```
Changing directory ### Changing directory
------------------
```sh ```sh
# fd - cd to selected directory # fd - cd to selected directory
@@ -51,15 +49,13 @@ cdf() {
} }
``` ```
Searching file contents ### Searching file contents
-----------------------
```sh ```sh
grep --line-buffered --color=never -r "" * | fzf grep --line-buffered --color=never -r "" * | fzf
``` ```
Command history ### Command history
---------------
```sh ```sh
# fh - repeat history # fh - repeat history
@@ -77,7 +73,7 @@ fh() {
Replacing `eval` with `print -z` will push the arguments onto the editing buffer stack, allowing you to edit the command before running it. It also means the command you run will appear in your history rather than just `fh`. Unfortunately this only works for zsh. Replacing `eval` with `print -z` will push the arguments onto the editing buffer stack, allowing you to edit the command before running it. It also means the command you run will appear in your history rather than just `fh`. Unfortunately this only works for zsh.
### With write to terminal capabilities #### With write to terminal capabilities
```sh ```sh
# utility function used to write the command in the shell # utility function used to write the command in the shell
@@ -98,8 +94,7 @@ fhe() {
This have been tested in bash. This have been tested in bash.
Processes ### Processes
---------
```sh ```sh
# fkill - kill process # fkill - kill process
@@ -113,8 +108,7 @@ fkill() {
} }
``` ```
Git ### Git
---
```sh ```sh
# fbr - checkout git branch # fbr - checkout git branch
@@ -136,8 +130,7 @@ fco() {
} }
``` ```
Tags ### Tags
----
```sh ```sh
# ftags - search ctags # ftags - search ctags
@@ -152,8 +145,7 @@ ftags() {
} }
``` ```
tmux ### tmux
----
```sh ```sh
# fs [FUZZY PATTERN] - Select selected tmux session # fs [FUZZY PATTERN] - Select selected tmux session
@@ -188,8 +180,7 @@ ftpane () {
} }
``` ```
z ### z
-
Integration with [z](https://github.com/rupa/z), like normal z when used with Integration with [z](https://github.com/rupa/z), like normal z when used with
arguments but displays an fzf prompt when used without. arguments but displays an fzf prompt when used without.
@@ -231,8 +222,7 @@ alias j=z
alias jj=zz alias jj=zz
``` ```
browsing ### Browsing
----
```sh ```sh
# fsfzf - browse file system # fsfzf - browse file system