mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/remove-abspath-cleanup'
* origin/topic/timw/remove-abspath-cleanup: diff-remove-abspath: Add separate handling of Windows paths diff-remove-abspath: Remove capture of windows drive letters from POSIX regex
This commit is contained in:
commit
0217208c49
3 changed files with 11 additions and 2 deletions
|
@ -2,6 +2,9 @@
|
|||
#
|
||||
# Replace absolute paths with the basename.
|
||||
|
||||
# The drive letter portion of the Windows regex below is adapted from
|
||||
# https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/regexp/basename-windows/lib/regexp.js
|
||||
sed -E 's#/+#/#g' |
|
||||
sed -E 's#[^( ]*testing_btest#<___>testing_btest#' |
|
||||
sed -E 's#([a-zA-Z]:)?/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\3#g'
|
||||
sed -E 's#/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\2#g' |
|
||||
sed -E 's#([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)([\\/])([^ :\\/]{1,}[\\/]){1,}([^ :\\/]{1,})#<...>/\4#g'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue