Quellcode durchsuchen

Fix sed commands (#2071)

In GNU `sed`, the `-iEe` argument is equivalent to `--in-place=Ee`, which would create `~/.profileEe` as backup of `~/.profile` if the command executed successfully. However, because the `e` is no longer being processed as an expression argument, `sed` does not correctly join the expressions and exits with `sed: -e expression #2, char 10: unexpected }`.

The intent is to use extended regex, perform the changes in-place, and use a series of expressions, so `-Ei -e` is used instead.
pull/2072/head
rallyemax vor 3 Jahren
committed von GitHub
Ursprung
Commit
0c6ad7c52b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      README.md

+ 2
- 2
README.md Datei anzeigen

@ -239,7 +239,7 @@ easy to fork and contribute any changes back upstream.
~~~bash
# the sed invocation inserts the lines at the start of the file
# after any initial comment lines
sed -iEe '/^([^#]|$)/ {a \
sed -Ei -e '/^([^#]|$)/ {a \
export PYENV_ROOT="$HOME/.pyenv"
a \
export PATH="$PYENV_ROOT/bin:$PATH"
@ -253,7 +253,7 @@ easy to fork and contribute any changes back upstream.
- **If your `~/.bash_profile` sources `~/.bashrc` (Red Hat, Fedora, CentOS):**
~~~ bash
sed -iEe '/^([^#]|$)/ {a \
sed -Ei -e '/^([^#]|$)/ {a \
export PYENV_ROOT="$HOME/.pyenv"
a \
export PATH="$PYENV_ROOT/bin:$PATH"

Laden…
Abbrechen
Speichern