[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: info: can we add a way to get the default path?



On debian-devel, Rob Browning <rlb@cs.utexas.edu> wrote:
> A long time back, I had needed to add /usr/local/XXX to my info path
> to get some local info pages.  Unfortunately, since there info
> provides no way to determine the default path, and since INFOPATH is
> not normally set to anything, I had to set the full path in my
> .bashrc:
> 
>   export INFOPATH=/usr/local/XXX:/usr/local/info:/usr/info
> 
> This worked OK, but I knew it was likely to be trouble.  Sure enough,
> with the migration to /usr/share/info, things started breaking.
> 
> What I'm wondering is if it would make sense to augment info to
> support either
> 
>   1) An option that tells it to print it's default path, say
>      --print-default-path.  Then in your .bashrc, you could just say
> 
>         export INFOPATH=/usr/local/XXX:$(info --print-default-path)
> 

How about:

export \
INFOPATH=/usr/local/XXX:$(strings /usr/bin/info | egrep  '^/usr' | head -n 1)

-- 
I consume, therefore I am

Attachment: pgpbp0yCTxPVB.pgp
Description: PGP signature


Reply to: