Skip to content

Commit

Permalink
Merge pull request #13 from fwyzard/cmsrel_tab_completion
Browse files Browse the repository at this point in the history
Implement tab completion for cmsrel
  • Loading branch information
smuzaffar authored Sep 26, 2024
2 parents 0471f57 + 32d34dc commit 969c4c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions share/etc/profile.d/S00cmsrel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash

# Tab completion for cmsrel
function _cmsrel() {
local RELEASES=$(scramv1 list -c CMSSW | awk '{ print $2 }' | sort)
COMPREPLY=($(compgen -W "$RELEASES" "${COMP_WORDS[$COMP_CWORD]}"))
}

complete -F _cmsrel cmsrel

0 comments on commit 969c4c4

Please sign in to comment.