You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I use sesh like cd/zoxide but automatically creates a new tmux session at the same time.
So I would usually go like
# this is just in simple command form but i usually interact with this in fzf# go to my project directory
sesh connect ~/Code
# create a new project like
mkdir new-project
# and then connect to it
sesh connect ~/Code/new-project
but then I would be left with a session that will just clutter my list of sessions and I have to remove later.
I also like to use it after I know I'm done with a session as a bitty bit faster way of killing one and also I get to select the next session I want to view.
So I have made a workaround via a script.
#!/bin/sh# t is just this script without the kill-session
[ !-n"$TMUX" ] && {
t
return
}
prev_session=$(tmux display-message -p '#S')
out=$( sesh list -i -H | fzf-tmux -e --ansi -p 80%,80% \ --no-sort --border-label ' sesh relinquish ' --prompt '⚡ ' \ --header ' ^a all ^t sessions ^f find ^k kill selected session' \ --bind 'tab:down,btab:up' \ --bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list -iH)' \ --bind 'ctrl-t:change-prompt( )+reload(sesh list -it)' \ --bind 'ctrl-f:change-prompt( )+reload(fd -td --absolute-path | sed -E "s|$HOME|~|g; s|.*|\x1b[36m \x1b[0m&\x1b[0m|")' \ --bind 'ctrl-k:execute(tmux kill-session -t $(echo {} | cut -c 5-))+change-prompt(⚡ )+reload(sesh list -i -H)')
sesh connect "$out"||returnif [ "$out"!="" ];then
tmux kill-session -t "$prev_session"fi
So I would use Ctrl-F to show all the relative files and connect to them
this type of workflow also influenced this #133 issue because without using --absolute-path It will just break
But I would very much appreciate an option in sesh connect and maybe in sesh clone too so I wouldn't have to use this weird script
OPTIONS:
--abandon -a Only works while within a session, after connecting to a different session, kill previous session.
The text was updated successfully, but these errors were encountered:
What would you like sesh to do?
Sometimes I use sesh like cd/zoxide but automatically creates a new tmux session at the same time.
So I would usually go like
but then I would be left with a session that will just clutter my list of sessions and I have to remove later.
I also like to use it after I know I'm done with a session as a bitty bit faster way of killing one and also I get to select the next session I want to view.
So I have made a workaround via a script.
So I would use Ctrl-F to show all the relative files and connect to them
But I would very much appreciate an option in
sesh connect
and maybe insesh clone
too so I wouldn't have to use this weird scriptThe text was updated successfully, but these errors were encountered: