Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Command substitution parsing issues (not really Re: completion)



On Fri, 16 Jan 2015 19:29:42 -0800
Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> > In fact if you're going to live on the bleeding edge of git pull, you
> > should have a separate shared-object directory for every build.
> 
> Can you suggest a method?

I find it good enough to be able to point the compiled executable in Src
at a special set of libraries by using an environment variable (you
could even avoid that if you detected where the shell was running from
early enough).

The basic idea (the actual implementation has got complicated) is
.zshenv contains

if [[ -n $TEST_MODULES ]]; then
  module_path=(~/src/zsh/modules .)
fi

and the module links were set up with some variant of the function
below.

pws


## create_module_links
local src=$1
local f

if [[ -z $src ]]; then
  print "Usage: $0 path-to-zsh-src-dir
Current directory is directory to create links (above zsh)."
fi

for f in $src/**/*.mdd~*/zsh.mdd; do
  lib=${f:r}.so
  [[ -f $lib ]] && print "Found $lib"
  name="${$(grep '^name=' $f)##name=}.so"
  print "Link for $lib is $name."
  mkdir -p ${name:h}
  ln -s $lib $name
done
##



Messages sorted by: Reverse Date, Date, Thread, Author