File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33It can either accept no input to list all files. A list of files can be piped in (such as through ``find``)
44or it can be used as a wrapper around a certain tool to block or allow files under control by dfetch.
5+
6+ .. scenario-include:: ../features/filter-projects.feature
7+
58"""
69
710import argparse
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source ./demo-magic/demo-magic.sh
4+
5+ PROMPT_TIMEOUT=1
6+
7+ # Copy example manifest
8+ mkdir filter
9+ pushd filter
10+
11+ cp -r ../update/* .
12+ clear
13+
14+ # Run the command
15+ pe " cat dfetch.yaml"
16+ pe " dfetch filter"
17+ pe " find . | dfetch filter"
18+ pe " find . | dfetch filter echo"
19+
20+
21+ PROMPT_TIMEOUT=3
22+ wait
23+
24+ pei " "
25+
26+ popd
27+ rm -rf filter
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ asciinema rec --overwrite -c "./update-demo.sh" ../asciicasts/update.cast
1717asciinema rec --overwrite -c " ./report-demo.sh" ../asciicasts/report.cast
1818asciinema rec --overwrite -c " ./report-sbom-demo.sh" ../asciicasts/sbom.cast
1919asciinema rec --overwrite -c " ./freeze-demo.sh" ../asciicasts/freeze.cast
20+ asciinema rec --overwrite -c " ./filter-demo.sh" ../asciicasts/filter.cast
2021asciinema rec --overwrite -c " ./diff-demo.sh" ../asciicasts/diff.cast
2122
2223rm -rf update
Original file line number Diff line number Diff line change @@ -115,6 +115,19 @@ Freeze
115115
116116.. automodule :: dfetch.commands.freeze
117117
118+
119+ Filter
120+ ------
121+ .. argparse ::
122+ :module: dfetch.__main__
123+ :func: create_parser
124+ :prog: dfetch
125+ :path: filter
126+
127+ .. asciinema :: asciicasts/filter.cast
128+
129+ .. automodule :: dfetch.commands.filter
130+
118131Environment
119132-----------
120133.. argparse ::
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Feature: Filtering file paths before executing a tool
1919 url: some-remote-server/SomeProject.git
2020 """
2121
22- Scenario : Tool receives only managed files
22+ Scenario : Tool shows all files under dfetch control
2323 When I run "dfetch filter"
2424 Then the output shows
2525 """
You can’t perform that action at this time.
0 commit comments