m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Updated Examples (markdown)

NightMachinary
2019-09-04 16:29:54 +04:30
parent c72fa2c4d5
commit b85add6379

@@ -666,6 +666,22 @@ ftags() {
### tmux
```zsh
# zsh; needs setopt re_match_pcre. You can, of course, adapt it to your own shell easily.
tmuxkillf () {
local sessions
sessions="$(tmux ls|fzf --exit-0 --multi)" || return $?
local i
for i in "${(f@)sessions}"
do
[[ $i =~ '([^:]*):.*' ]] && {
echo "Killing $match[1]"
tmux kill-session -t "$match[1]"
}
done
}
```
```sh
# tm - create new tmux session, or switch to existing one. Works from within tmux too. (@bag-man)
# `tm` will allow you to select your tmux session via fzf.