diff --git a/bash_completion_tmux.sh b/bash_completion_tmux.sh new file mode 100644 index 0000000000000000000000000000000000000000..74728b91e3aa7ef49d3c3cb4cb13666d0cf29eae --- /dev/null +++ b/bash_completion_tmux.sh @@ -0,0 +1,105 @@ +# START tmux completion +# This file is in the public domain +# See: http://www.debian-administration.org/articles/317 for how to write more. +# Usage: Put "source bash_completion_tmux.sh" into your .bashrc +_tmux() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts=" \ + attach-session \ + bind-key \ + break-pane \ + capture-pane \ + choose-client \ + choose-session \ + choose-window \ + clear-history \ + clock-mode \ + command-prompt \ + confirm-before \ + copy-buffer \ + copy-mode \ + delete-buffer \ + detach-client \ + display-message \ + display-panes \ + down-pane \ + find-window \ + has-session \ + if-shell \ + join-pane \ + kill-pane \ + kill-server \ + kill-session \ + kill-window \ + last-window \ + link-window \ + list-buffers \ + list-clients \ + list-commands \ + list-keys \ + list-panes \ + list-sessions \ + list-windows \ + load-buffer \ + lock-client \ + lock-server \ + lock-session \ + move-window \ + new-session \ + new-window \ + next-layout \ + next-window \ + paste-buffer \ + pipe-pane \ + previous-layout \ + previous-window \ + refresh-client \ + rename-session \ + rename-window \ + resize-pane \ + respawn-window \ + rotate-window \ + run-shell \ + save-buffer \ + select-layout \ + select-pane \ + select-prompt \ + select-window \ + send-keys \ + send-prefix \ + server-info \ + set-buffer \ + set-environment \ + set-option \ + set-window-option \ + show-buffer \ + show-environment \ + show-messages \ + show-options \ + show-window-options \ + source-file \ + split-window \ + start-server \ + suspend-client \ + swap-pane \ + swap-window \ + switch-client \ + unbind-key \ + unlink-window \ + up-pane" + + COMPREPLY=($(compgen -W "${opts}" -- ${cur})) + return 0 + +} +complete -F _tmux tmux + +# END tmux completion + + + diff --git a/tmux-3.2a.tar.gz b/tmux-3.2a.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a526fb084c2d93f594b8a3f719443d9e09b6be87 Binary files /dev/null and b/tmux-3.2a.tar.gz differ diff --git a/tmux.spec b/tmux.spec new file mode 100644 index 0000000000000000000000000000000000000000..e1645a11ead0cf20857e72abe6e440bc278d4562 --- /dev/null +++ b/tmux.spec @@ -0,0 +1,71 @@ +%define anolis_release 1 +%global _hardened_build 1 + +Name: tmux +Version: 3.2a +Release: %{anolis_release}%{?dist} +Summary: A terminal multiplexer + +# Most of the source is ISC licensed; some of the files in compat/ are 2 and +# 3 clause BSD licensed. +License: ISC and BSD +URL: https://tmux.github.io/ +Source0: https://github.com/tmux/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: bash_completion_tmux.sh + +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconfig(libevent_core) >= 2 +BuildRequires: pkgconfig(tinfo) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(ncursesw) +BuildRequires: libutempter-devel + +%description +tmux is a "terminal multiplexer." It enables a number of terminals (or +windows) to be accessed and controlled from a single terminal. tmux is +intended to be a simple, modern, BSD-licensed alternative to programs such +as GNU Screen. + +%prep +%autosetup + +%build +%configure +%make_build + + +%install +%make_install +# bash completion +install -Dpm 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/tmux + +%post +if [ "$1" = 1 ]; then + if [ ! -f %{_sysconfdir}/shells ] ; then + touch %{_sysconfdir}/shells + fi + for binpath in %{_bindir} /bin; do + if ! grep -q "^${binpath}/tmux$" %{_sysconfdir}/shells; then + (cat %{_sysconfdir}/shells; echo "$binpath/tmux") > %{_sysconfdir}/shells.new + mv %{_sysconfdir}/shells{.new,} + fi + done +fi + +%postun +if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then + sed -e '\!^%{_bindir}/tmux$!d' -e '\!^/bin/tmux$!d' < %{_sysconfdir}/shells > %{_sysconfdir}/shells.new + mv %{_sysconfdir}/shells{.new,} +fi + +%files +%doc CHANGES +%doc example_tmux.conf +%{_bindir}/tmux +%{_mandir}/man1/tmux.1.* +%{_datadir}/bash-completion/completions/tmux + +%changelog +* Wed Apr 13 2022 Chunmei Xu - 3.2a-1 +- init from upstream