mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
Updated Examples (markdown)
16
Examples.md
16
Examples.md
@@ -666,6 +666,22 @@ ftags() {
|
|||||||
|
|
||||||
### tmux
|
### 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
|
```sh
|
||||||
# tm - create new tmux session, or switch to existing one. Works from within tmux too. (@bag-man)
|
# 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.
|
# `tm` will allow you to select your tmux session via fzf.
|
||||||
|
|||||||
Reference in New Issue
Block a user