From d74d3f2ca45ed6dbf6243f7f74a0681be53bf42b Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 5 Oct 2017 13:20:55 +0200 Subject: [PATCH] Use `string replace` instead of `sed` with better regex for pip completions --- share/completions/pip2.fish | 2 +- share/completions/pip3.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/completions/pip2.fish b/share/completions/pip2.fish index 6a4dc1c78..76d3a1465 100644 --- a/share/completions/pip2.fish +++ b/share/completions/pip2.fish @@ -1,3 +1,3 @@ if command -sq pip2 - pip2 completion --fish | sed 's/-c pip$/-c pip2/' | source + pip3 completion --fish | string replace -r "\b-c\s+pip\b" -- "-c pip2" | source end diff --git a/share/completions/pip3.fish b/share/completions/pip3.fish index e2078c761..fd12cc224 100644 --- a/share/completions/pip3.fish +++ b/share/completions/pip3.fish @@ -1,3 +1,3 @@ if command -sq pip3 - pip3 completion --fish | sed 's/-c pip$/-c pip3/' | source + pip3 completion --fish | string replace -r "\b-c\s+pip\b" -- "-c pip3" | source end