mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 10:51:41 +00:00
Moved hub into the git plugin.
This commit is contained in:
12
plugins/perl/functions/pgs
Normal file
12
plugins/perl/functions/pgs
Normal file
@ -0,0 +1,12 @@
|
||||
# Perl Global Substitution
|
||||
if (( $# < 2 )); then
|
||||
print "Usage: $0 find replace [file ...]" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local find="$1"
|
||||
local replace="$2"
|
||||
repeat 2 shift
|
||||
|
||||
perl -i.orig -pe 's/'"$find"'/'"$replace"'/g' "$@"
|
||||
|
Reference in New Issue
Block a user