mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 17:13:42 -05:00
Updated Examples (markdown)
32
Examples.md
32
Examples.md
@@ -1,5 +1,4 @@
|
||||
Opening files
|
||||
-------------
|
||||
### Opening files
|
||||
|
||||
```sh
|
||||
# fe [FUZZY PATTERN] - Open the selected file with the default editor
|
||||
@@ -19,8 +18,7 @@ fo() {
|
||||
}
|
||||
```
|
||||
|
||||
Changing directory
|
||||
------------------
|
||||
### Changing directory
|
||||
|
||||
```sh
|
||||
# fd - cd to selected directory
|
||||
@@ -51,15 +49,13 @@ cdf() {
|
||||
}
|
||||
```
|
||||
|
||||
Searching file contents
|
||||
-----------------------
|
||||
### Searching file contents
|
||||
|
||||
```sh
|
||||
grep --line-buffered --color=never -r "" * | fzf
|
||||
```
|
||||
|
||||
Command history
|
||||
---------------
|
||||
### Command history
|
||||
|
||||
```sh
|
||||
# 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.
|
||||
|
||||
### With write to terminal capabilities
|
||||
#### With write to terminal capabilities
|
||||
|
||||
```sh
|
||||
# utility function used to write the command in the shell
|
||||
@@ -98,8 +94,7 @@ fhe() {
|
||||
|
||||
This have been tested in bash.
|
||||
|
||||
Processes
|
||||
---------
|
||||
### Processes
|
||||
|
||||
```sh
|
||||
# fkill - kill process
|
||||
@@ -113,8 +108,7 @@ fkill() {
|
||||
}
|
||||
```
|
||||
|
||||
Git
|
||||
---
|
||||
### Git
|
||||
|
||||
```sh
|
||||
# fbr - checkout git branch
|
||||
@@ -136,8 +130,7 @@ fco() {
|
||||
}
|
||||
```
|
||||
|
||||
Tags
|
||||
----
|
||||
### Tags
|
||||
|
||||
```sh
|
||||
# ftags - search ctags
|
||||
@@ -152,8 +145,7 @@ ftags() {
|
||||
}
|
||||
```
|
||||
|
||||
tmux
|
||||
----
|
||||
### tmux
|
||||
|
||||
```sh
|
||||
# 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
|
||||
arguments but displays an fzf prompt when used without.
|
||||
@@ -231,8 +222,7 @@ alias j=z
|
||||
alias jj=zz
|
||||
```
|
||||
|
||||
browsing
|
||||
----
|
||||
### Browsing
|
||||
|
||||
```sh
|
||||
# fsfzf - browse file system
|
||||
|
||||
Reference in New Issue
Block a user