Skip to content

Commit

Permalink
Add --rexec example to symbex --help, refs #34
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jul 16, 2023
1 parent ccb57d3 commit 3ce59ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ Usage: symbex [OPTIONS] [SYMBOLS]...
return a + b + 3
" | symbex my_function --replace
# Replace my_function with the output of a command:
symbex first_function --rexec "sed 's/^/# /'"
# This uses sed to comment out the function body
Options:
--version Show the version and exit.
-f, --file FILE Files to search
Expand Down
5 changes: 5 additions & 0 deletions symbex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ def cli(
# This is a replacement implementation
return a + b + 3
" | symbex my_function --replace
\b
# Replace my_function with the output of a command:
symbex first_function --rexec "sed 's/^/# /'"
# This uses sed to comment out the function body
"""
if modules:
module_dirs = []
Expand Down

0 comments on commit 3ce59ae

Please sign in to comment.