spack/share/spack
Todd Gamblin 16e75ecac0
shell support: make which spack output intelligible (#19256)
Zsh and newer versions of bash have a builtin `which` function that will
show you if a command is actually an alias or a function. For functions,
the entire function is printed, and our `spack()` function is quite long.
Instead of printing out all that, make the `spack()` function a wrapper
around `_spack_shell_wrapper()`, and include some no-ops in the
definition so that users can see where it was created and where Spack is
installed.

Here's what the new output looks like in zsh:

```console
$ which spack
spack () {
	: this is a shell function from: /Users/gamblin2/src/spack/share/spack/setup-env.sh
	: the real spack script is here: /Users/gamblin2/src/spack/bin/spack
	_spack "$@"
	return $?
}
```

Note that `:` is a no-op in Bourne shell; it just discards anything after
it on the line. We use it here to embed paths in the function definition
(as comments are stripped).
2020-10-21 17:04:42 -07:00
..
bash Added alias and bash completion for spacktivate (#16472) 2020-05-13 12:02:38 -06:00
csh macos: use DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH 2020-04-16 17:23:33 -07:00
docker Make the largest layer of the docker image cacheable (#17553) 2020-07-16 13:15:04 -04:00
docs/docker/module-file-tutorial autotools: remove FORCE_UNSAFE_CONFIGURE from docs, commands, code (#16145) 2020-04-20 08:32:03 -07:00
gitlab OLCF Ascent gitlab ci trigger: pass SPACK_REF (#18875) 2020-09-23 09:35:29 -07:00
keys add tutorial public key to share/spack/keys dir (#17684) 2020-07-23 14:35:25 -07:00
logo add artisanal handcrafted SVG Spack logo. (#6165) 2017-11-06 22:42:16 -08:00
qa Add new RubyPackage build system base class (#18199) 2020-09-02 16:26:36 -07:00
templates spack containerize: added --fail-fast argument to containerize install. (#17533) 2020-07-15 11:13:04 +02:00
setup-env.csh bugfix: no infinite recursion in setup-env.sh on Cray 2020-07-06 13:55:14 -07:00
setup-env.fish Bugfix for fish support: overly zealous arg matching (#18528) 2020-09-10 10:01:44 -05:00
setup-env.sh shell support: make which spack output intelligible (#19256) 2020-10-21 17:04:42 -07:00
setup-tutorial-env.sh tutorial: Add boto3 installation to setup script (#17722) 2020-07-27 16:55:33 -07:00
spack-completion.bash Add testing option to dev-build command (#17293) 2020-10-18 23:17:07 -05:00