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
The latest _build_tmux_alias causes the tmux ta alias to be defined as the following function,
ta () {
if [[ -z $1 ]] || [[ ${1:0:1} == '-' ]]
then
tmux attach "$@"
else
tmux attach -t "$@"
fi
}
instead of the previous command,
ta: aliased to tmux attach -t
which makes autocompletion of session names not work. When using TAB to autocomplete, instead of providing the list of sessions to choose, it provides the list of files/folders in the current directory, presumably because it doesn't know what command it's trying to autocomplete for.
Steps to reproduce
run omz update
try to use ta TAB autocompletion as before
Expected behavior
Ideally, pressing TAB after entering ta would provide a list of current sessions, as before.
Screenshots and recordings
No response
OS / Linux distribution
macOS
Zsh version
5.9
Terminal emulator
iTerm2
If using WSL on Windows, which version of WSL
None
Additional context
No response
The text was updated successfully, but these errors were encountered:
@matthew-nm I've issued a PR to fix this and am just waiting for it to be reviewed and merged. Feel free to test and report if this doesn't give you everything you had before.
@detroyejr Excellent! I've tested and it works great.
The results are shown slightly differently between the alias and the full command, but I don't think it would bother anyone.
❯ tmux attach -t
-- detached session --
flutter_3_0_course -- 2 windows (created Tue Feb 20 20:40:50 2024)
-- attached session --
dotfiles -- 3 windows (created Wed Jan 17 16:03:51 2024) (attached)
flutter_randomizer -- 2 windows (created Mon Mar 18 21:10:47 2024) (attached)
❯ ta
-- tmux session --
dotfiles -- 3 windows (created Wed Jan 17 16:03:51 2024) (attached)
flutter_3_0_course -- 2 windows (created Tue Feb 20 20:40:50 2024)
flutter_randomizer -- 2 windows (created Mon Mar 18 21:10:47 2024) (attached)
For my own curiosity, why is something like the following not used?
function _build_tmux_alias {
eval "if [[ -z \$1 ]] || [[ \${1:0:1} == '-' ]]; then
alias \$1=\"tmux $2\"
else
alias \$1=\"tmux $2 $3\"
fi"
}
I did a quick test just now and it seems to work OK without having to reimplement any of the completions. And I imagine it would stand up to any completion updates in the future.
Describe the bug
The latest
_build_tmux_alias
causes the tmuxta
alias to be defined as the following function,instead of the previous command,
which makes autocompletion of session names not work. When using TAB to autocomplete, instead of providing the list of sessions to choose, it provides the list of files/folders in the current directory, presumably because it doesn't know what command it's trying to autocomplete for.
Steps to reproduce
omz update
ta
TAB autocompletion as beforeExpected behavior
Ideally, pressing TAB after entering
ta
would provide a list of current sessions, as before.Screenshots and recordings
No response
OS / Linux distribution
macOS
Zsh version
5.9
Terminal emulator
iTerm2
If using WSL on Windows, which version of WSL
None
Additional context
No response
The text was updated successfully, but these errors were encountered: