mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Updated Examples (markdown)
20
Examples.md
20
Examples.md
@@ -1114,6 +1114,26 @@ c() {
|
||||
|
||||
#### Bookmarks
|
||||
|
||||
Chrome Bookmarks browser with [jq](https://stedolan.github.io/jq/) for OS X
|
||||
```
|
||||
# b - browse chrome bookmarks
|
||||
b() {
|
||||
bookmarks_path=~/Library/Application\ Support/Google/Chrome/Default/Bookmarks
|
||||
|
||||
jq_script='
|
||||
def ancestors: while(. | length >= 2; del(.[-1,-2]));
|
||||
. as $in | paths(.url?) as $key | $in | getpath($key) | {name,url, path: [$key[0:-2] | ancestors as $a | $in | getpath($a) | .name?] | reverse | join("/") } | .path + "/" + .name + "\t" + .url'
|
||||
|
||||
jq -r $jq_script < "$bookmarks_path" \
|
||||
| sed -E $'s/(.*)\t(.*)/\\1\t\x1b[36m\\2\x1b[m/g' \
|
||||
| fzf --ansi \
|
||||
| cut -d$'\t' -f2 \
|
||||
| xargs open
|
||||
}
|
||||
```
|
||||
|
||||
Chrome Bookmarks browser with ruby
|
||||
|
||||
https://gist.github.com/junegunn/15859538658e449b886f (for OS X)
|
||||
|
||||
### Browsing
|
||||
|
||||
Reference in New Issue
Block a user