mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
scripts/tmuxs: select session with -a flag
This commit is contained in:
parent
51b5d4750f
commit
8ea00b5708
1 changed files with 6 additions and 2 deletions
|
|
@ -1,9 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
if [[ "$1" -eq "-a" ]]; then
|
||||
selected=$(tmux list-sessions | fzf | sed 's/: .*//g')
|
||||
else
|
||||
selected=$(realpath $1)
|
||||
fi
|
||||
else
|
||||
DIRECTORIES=$(cat ~/.tmuxs | sed "s&^\~&${HOME}&g")
|
||||
DIRECTORIES=$(cat ~/.tmuxs | sed "s&^\~&${HOME}&g")
|
||||
selected=$(find ${DIRECTORIES} -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue