Configuration for MacPorts in the fish shell.
Install with Fisher:
fisher install halostatue/fish-macports@v1
The configuration file for fish-macports will detect the presence of the port
executable (at /opt/local/bin/port
) and place the MacPorts binary paths in
$PATH
.
If /opt/local/bin
is found in $fish_user_paths
, $PATH
configuration will
be skipped. Note that putting MacPorts paths in $fish_user_paths
is not
recommended, as /opt/local/sbin
may be placed before /usr/bin
, potentially
resulting in odd behaviours.
The correct ordering of MacPorts paths with default paths is:
/opt/local/bin
/usr/local/bin
/usr/bin
/bin
/opt/local/sbin
/usr/local/sbin
/usr/sbin
/sbin
If the Homebrew brew
binary is present and (brew --prefix)/{,s}bin
are in
$PATH
(but not in $fish_user_paths
), this plugin will order the paths
according to the configuration value __halostatue_macports_homebrew_order
,
which should be set as a universal variable.
If unset or macports
, the paths will be ordered as:
/opt/local/bin
(brew --prefix)/bin
/usr/local/bin
/usr/bin
/bin
/opt/local/sbin
(brew --prefix)/sbin
/usr/local/sbin
/usr/sbin
/sbin
If set to homebrew
, the paths will be ordered as:
(brew --prefix)/bin
/opt/local/bin
/usr/local/bin
/usr/bin
/bin
(brew --prefix)/sbin
/opt/local/sbin
/usr/local/sbin
/usr/sbin
/sbin