Closed ChristopherHarwell closed 1 year ago
@ChristopherHarwell A very detailed PR description. Well done!
Are you up to signing the CLA before I merge?
Merging #883 (70a9a31) into master (f794f31) will not change coverage. Report is 63 commits behind head on master. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #883 +/- ##
=======================================
Coverage 71.29% 71.29%
=======================================
Files 25 25
Lines 1850 1850
Branches 410 410
=======================================
Hits 1319 1319
Misses 411 411
Partials 120 120
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@ChristopherHarwell Hi, thanks again for the contribution.
Can you sign the CLA?
@ChristopherHarwell Hi! Can you take a look at this?
Yes. I just signed it.
@ChristopherHarwell Thank you!
@ChristopherHarwell Live in 1.30.1 (PyPI, highlight, current README, highlight)
Thank you once again for the contribution!
What does this change add?
I updated to README to have a one liner shell script for installing
tmuxp
with Nix package manager.What does the one-command do?
The one-liner command using Nix to install
tmux
andtmuxp
while ensuring thattmux
is installed before installingtmuxp
can be explained as follows:The command starts with
[[ -z $(which tmux) ]] &&
.[[ -z $(which tmux) ]]
checks if the commandwhich tmux
returns an empty string, indicating thattmux
is not found.[[ ... ]]
are used for conditional tests in shell scripts.-z
flag checks if the string is empty [^1].$(...)
is command substitution, which executes the command within the parentheses and replaces it with the output of that command [^1].If
tmux
is not found, the command executes the following block:echo "tmux not found, please install tmux first"
.tmux
needs to be installed before proceeding with tmuxp installation.If
tmux
is found, the command executes the following block:(nix-env -i tmux && nix-env -i tmuxp)
[^2].(command1 && command2)
executescommand1
and thencommand2
ifcommand1
succeeds.nix-env -i tmux
installs tmux using thenix-env
command.nix-env -i tmuxp
installs tmuxp using thenix-env
command.If tmux is already installed, the command executes the following block:
nix-env -i tmuxp
.tmuxp
using thenix-env
command.In summary, the one-liner command checks if
tmux
is installed, and if not, it displays a message to installtmux
first. Otherwise, it installstmux
and then installstmuxp
.References:
[^1]: github.com - tmux wiki [^2]: github.com - installing tmux + tmuxp with Nix