On Wed, Oct 22, 2025 at 04:43:47AM +0200, Nils Breunese <[email protected]> 
wrote:

> Your own symlinks shouldn’t affect MacPorts or get overwritten. Definitely 
> not when you keep them out of /opt/local (e.g. /usr/local/bin/lua -> 
> /opt/local/bin/lua5.4), but even under /opt/local/bin they should stay 
> untouched until you install a port which claims that path.
> 
> A symlink wouldn’t be a piecemeal solution, under the hood the ‘port select’ 
> command would also just create a symlink (/opt/local/bin/lua -> 
> /opt/local/bin/lua5.4).
> 
> As long as it’s just for your own user account, I think I’d personally just 
> create an alias in my shell configuration.

A shell alias only applies to interactively typed commands.
A better idea is a script in ~/bin with ~/bin early in $PATH.
Then any the lua command is accessible from other scripts/programs.

cheers,
raf

> Nils.
> 
> Kenneth Wolcott <[email protected]> wrote:
> 
> > Thank you, Nils.  I had already tried my own symlinks, but I realized that 
> > when lua was updated I'd probably confuse MacPorts or it would get 
> > overwritten. I guess a local alias would be a better workaround than using 
> > the symlinks. Also, I was concerned that this would be a piecemail 
> > solution, not all Lua functionality might be available by doing it this 
> > way.  Wrote up a MacPorts enhancement request.
> > 
> > Thanks,
> > Ken Wolcott
> > 
> > On Tue, Oct 21, 2025 at 5:37 PM Nils Breunese <[email protected]> wrote:
> > Kenneth Wolcott <[email protected]> wrote:
> > 
> > > This fails:
> > > sudo port select --set lua lua5.4
> > > 
> > > I have lua54 installed.
> > > 
> > > /opt/local/bin/lua5.4 exists, /opt/local/bin/lua does not.
> > > 
> > > I'm confused.
> > 
> > You can run ‘port select --summary’ to show a list of all selection groups 
> > that available for the ports that are currently installed on your system. 
> > As far as I can see the lua* ports currently don’t provide a selection 
> > group for the ‘port select’ command, so the command you ran is expected to 
> > fail.
> > 
> > If you want to run ‘lua5.4' by calling ‘lua’, you can manage your own alias 
> > (set ‘alias lua=lua5.4’ in your shell configuration), create a symlink 
> > somewhere in your $PATH, or support for ‘port select’ will need to be added 
> > to the lua* ports (consider creating a feature request ticket in Trac).
> > 
> > Nils.

Reply via email to