Every Nix derivation produces a Nix store output that has 3 things:
- Executables
- Libraries
- Data
Executables are always exported using the PATH
environment variable. This is pretty much automatic.
ssh() { | |
# grep -w: match command names such as "tmux-2.1" or "tmux: server" | |
if ps -p $$ -o ppid= \ | |
| xargs -i ps -p {} -o comm= \ | |
| grep -qw tmux; then | |
# Note: Options without parameter were hardcoded, | |
# in order to distinguish an option's parameter from the destination. | |
# | |
# s/[[:space:]]*\(\( | spaces before options | |
# \(-[46AaCfGgKkMNnqsTtVvXxYy]\)\| | option without parameter |