Adds installation instructions for installing with Nix#883
Merged
tony merged 1 commit intotmux-python:masterfrom Sep 9, 2023
Merged
Conversation
Member
|
@ChristopherHarwell A very detailed PR description. Well done! Are you up to signing the CLA before I merge? |
Codecov Report
@@ 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 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Member
|
@ChristopherHarwell Hi, thanks again for the contribution. Can you sign the CLA? |
Member
|
@ChristopherHarwell Hi! Can you take a look at this? |
Contributor
Author
|
Yes. I just signed it. |
Member
|
@ChristopherHarwell Thank you! |
Member
|
@ChristopherHarwell Live in 1.30.1 (PyPI, highlight, current README, highlight) |
Member
|
Thank you once again for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change add?
I updated to README to have a one liner shell script for installing
tmuxpwith Nix package manager.What does the one-command do?
The one-liner command using Nix to install
tmuxandtmuxpwhile ensuring thattmuxis installed before installingtmuxpcan be explained as follows:The command starts with
[[ -z $(which tmux) ]] &&.-
[[ -z $(which tmux) ]]checks if the commandwhich tmuxreturns an empty string, indicating thattmuxis not found.- The double brackets
[[ ... ]]are used for conditional tests in shell scripts.- The
-zflag 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
tmuxis not found, the command executes the following block:echo "tmux not found, please install tmux first".- This block displays a message indicating that
tmuxneeds to be installed before proceeding with tmuxp installation.If
tmuxis found, the command executes the following block:(nix-env -i tmux && nix-env -i tmuxp)2.-
(command1 && command2)executescommand1and thencommand2ifcommand1succeeds.-
nix-env -i tmuxinstalls tmux using thenix-envcommand.-
nix-env -i tmuxpinstalls tmuxp using thenix-envcommand.If tmux is already installed, the command executes the following block:
nix-env -i tmuxp.- This block directly installs
tmuxpusing thenix-envcommand.In summary, the one-liner command checks if
tmuxis installed, and if not, it displays a message to installtmuxfirst. Otherwise, it installstmuxand then installstmuxp.References:
Footnotes
github.com - tmux wiki ↩ ↩2
github.com - installing tmux + tmuxp with Nix ↩