Skip to content

Commit b075105

Browse files
committed
lib/helpers: _bash-it-find-in-ancestor()
Use new `composure.sh` feature to avoid `cite()`.
1 parent 292d086 commit b075105

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/helpers.bash

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,14 +1021,14 @@ function pathmunge() {
10211021
# a subshell to simplify our search to a simple `cd ..` and `[[ -r $1 ]]`
10221022
# without any external dependencies. Let the shell do what it's good at.
10231023
function _bash-it-find-in-ancestor() (
1024-
about 'searches parents of the current directory for any of the specified file names'
1025-
group 'helpers'
1026-
param '*: names of files or folders to search for'
1027-
returns '0: prints path of closest matching ancestor directory to stdout'
1028-
returns '1: no match found'
1029-
returns '2: improper usage of shell builtin' # uncommon
1030-
example '_bash-it-find-in-ancestor .git .hg'
1031-
example '_bash-it-find-in-ancestor GNUmakefile Makefile makefile'
1024+
: _about 'searches parents of the current directory for any of the specified file names'
1025+
: _group 'helpers'
1026+
: _param '*: names of files or folders to search for'
1027+
: _returns '0: prints path of closest matching ancestor directory to stdout'
1028+
: _returns '1: no match found'
1029+
: _returns '2: improper usage of shell builtin' # uncommon
1030+
: _example '_bash-it-find-in-ancestor .git .hg'
1031+
: _example '_bash-it-find-in-ancestor GNUmakefile Makefile makefile'
10321032

10331033
local kin
10341034
# To keep things simple, we do not search the root dir.

0 commit comments

Comments
 (0)