diff options
author | Karel Kočí <cynerd@email.cz> | 2023-03-24 07:40:32 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-03-24 07:40:32 +0100 |
commit | 4eef4d6a2daea5ae8ab7ddd18b411ef151196d96 (patch) | |
tree | 9762056b61e376c648fcd7fcc32a9ef28d901897 | |
parent | c2f1e5b695ec28a58a94af2b48a1ef8bbc238964 (diff) | |
download | shellrc-4eef4d6a2daea5ae8ab7ddd18b411ef151196d96.tar.gz shellrc-4eef4d6a2daea5ae8ab7ddd18b411ef151196d96.tar.bz2 shellrc-4eef4d6a2daea5ae8ab7ddd18b411ef151196d96.zip |
pkgs/shellrc-user-setup: fix the grep that checks for existing content
-rw-r--r-- | pkgs.nix | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -40,11 +40,11 @@ cmdbash='eval $(shellrc-bash)' cmdzsh='eval $(shellrc-zsh)' if command -v shellrc-bash 2>/dev/null >&2 \ - && ! grep -xf "$cmdbash" ~/.bashrc; then + && ! grep -qxF "$cmdbash" ~/.bashrc 2>/dev/null; then echo "$cmdbash" >>~/.bashrc fi if command -v shellrc-zsh 2>/dev/null >&2 \ - && ! grep -xf "$cmdzsh" ~/.zshrc; then + && ! grep -qxF "$cmdzsh" ~/.zshrc 2>/dev/null; then echo "$cmdzsh" >>~/.zshrc fi ''; |