summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/__init__.py10
-rw-r--r--lib/spack/spack/cmd/find.py4
-rwxr-xr-xshare/spack/spack-completion.bash6
3 files changed, 15 insertions, 5 deletions
diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index 5e4564b1e8..f432fbf585 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -211,6 +211,7 @@ def display_specs(specs, args=None, **kwargs):
hashes = get_arg('long', False)
namespace = get_arg('namespace', False)
flags = get_arg('show_flags', False)
+ full_compiler = get_arg('show_full_compiler', False)
variants = get_arg('variants', False)
hlen = 7
@@ -219,7 +220,12 @@ def display_specs(specs, args=None, **kwargs):
hlen = None
nfmt = '.' if namespace else '_'
- ffmt = '$%+' if flags else ''
+ ffmt = ''
+ if full_compiler or flags:
+ ffmt += '$%'
+ if full_compiler:
+ ffmt += '@'
+ ffmt += '+'
vfmt = '$+' if variants else ''
format_string = '$%s$@%s%s' % (nfmt, ffmt, vfmt)
@@ -259,7 +265,7 @@ def display_specs(specs, args=None, **kwargs):
elif mode == 'short':
# Print columns of output if not printing flags
- if not flags:
+ if not flags and not full_compiler:
def fmt(s):
string = ""
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py
index bb8e2e5bcf..02ff10f425 100644
--- a/lib/spack/spack/cmd/find.py
+++ b/lib/spack/spack/cmd/find.py
@@ -60,6 +60,10 @@ def setup_parser(subparser):
action='store_true',
dest='show_flags',
help='show spec compiler flags')
+ subparser.add_argument('--show-full-compiler',
+ action='store_true',
+ dest='show_full_compiler',
+ help='show full compiler specs')
implicit_explicit = subparser.add_mutually_exclusive_group()
implicit_explicit.add_argument(
'-e', '--explicit',
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 05ae403eb5..4eb1c1c038 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -407,9 +407,9 @@ function _spack_find {
if $list_options
then
compgen -W "-h --help -s --short -p --paths -d --deps -l --long
- -L --very-long -f --show-flags -e --explicit
- -E --implicit -u --unknown -m --missing -v --variants
- -M --only-missing -N --namespace" -- "$cur"
+ -L --very-long -f --show-flags --show-full-compiler
+ -e --explicit -E --implicit -u --unknown -m --missing
+ -v --variants -M --only-missing -N --namespace" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi