aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-03-24 07:40:32 +0100
committerKarel Kočí <cynerd@email.cz>2023-03-24 07:40:32 +0100
commit4eef4d6a2daea5ae8ab7ddd18b411ef151196d96 (patch)
tree9762056b61e376c648fcd7fcc32a9ef28d901897
parentc2f1e5b695ec28a58a94af2b48a1ef8bbc238964 (diff)
downloadshellrc-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.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs.nix b/pkgs.nix
index ab36908..81104e7 100644
--- a/pkgs.nix
+++ b/pkgs.nix
@@ -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
'';