[pathmunge] fix test and modify metadata syntax in the function pathmunge to be easier supported in the test

This commit is contained in:
Ivan Povalyukhin
2015-06-07 20:23:19 -07:00
parent dabf0e8c42
commit 1cb9093c9c
2 changed files with 5 additions and 4 deletions

View File

@@ -365,10 +365,10 @@ all_groups ()
if ! type pathmunge > /dev/null 2>&1
then
function pathmunge () {
_about 'prevent duplicate directories in you PATH variable'
_group 'lib helpers'
_example 'pathmunge /path/to/dir is equivalent to PATH=/path/to/dir:$PATH'
_example 'pathmunge /path/to/dir after is equivalent to PATH=$PATH:/path/to/dir'
about 'prevent duplicate directories in you PATH variable'
group 'lib helpers'
example 'pathmunge /path/to/dir is equivalent to PATH=/path/to/dir:$PATH'
example 'pathmunge /path/to/dir after is equivalent to PATH=$PATH:/path/to/dir'
if ! [[ $PATH =~ (^|:)$1($|:) ]] ; then
if [ "$2" = "after" ] ; then