Skip to content

Commit

Permalink
remove current session from session list and order sessions according…
Browse files Browse the repository at this point in the history
… to last accessed
  • Loading branch information
27medkamal committed Nov 28, 2023
1 parent 96918e9 commit a61962d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session-wizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ if [ "$1" ]; then
RESULT=$(z $@ && pwd)
else
# No argument is given. Use FZF
RESULT=$((tmux list-sessions -F "#{session_name}: #{session_windows} window(s)\
#{?session_grouped, (group ,}#{session_group}#{?session_grouped,),}\
#{?session_attached, (attached),}"; zoxide query -l) | $(__fzfcmd) --reverse)
RESULT=$((tmux list-sessions -F "#{session_last_attached} #{session_name}: #{session_windows} window(s)\
#{?session_grouped, (group ,}#{session_group}#{?session_grouped,),}#{?session_attached, (attached),}"\
| sort -r | (if [ -n "$TMUX" ]; then grep -v " $(tmux display-message -p '#S'):"; else cat; fi) | cut -d' ' -f2-; zoxide query -l) | $(__fzfcmd) --reverse)
if [ -z "$RESULT" ]; then
exit 0
fi
Expand Down

0 comments on commit a61962d

Please sign in to comment.