m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Updated Examples (fish) (markdown)

Matthieu MN
2019-08-30 01:05:55 +02:00
parent d3d6d40d9f
commit 76d1662113

@@ -138,15 +138,23 @@ end
### Vscode
```fish
set -gx vscode_path "$HOME/.config/VScodium"
set -gx vscode_command "codium"
function vsr -d "List recently opened files with vscode"
codium (\
rg -o --no-line-number '"path": "/.*[^/]"' "$vscode_path/storage.json" \
set -l vscode_path "$HOME/.config/VSCodium"
set -l grep
if type -q rg
set grep rg -o --no-line-number
else
set grep grep -o
end
set -l selected (\
$grep '"path": "/.*[^/]"' "$vscode_path/storage.json" \
| string replace -a '"path": ' '' \
| string trim -c '"'\
| fzf )
| fzf --select-1 --exit-0 )
[ -n "$selected" ]; and codium "$selected"
end
```