We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01e0c32 commit a2941e6Copy full SHA for a2941e6
Linux/.bashrc
@@ -20,6 +20,12 @@ export BASH_IS_INTERACTIVE="0"
20
case $- in
21
*i*) export BASH_IS_INTERACTIVE="1";;
22
esac
23
+##Is Passwordless?
24
+if sudo -n true 2>/dev/null; then
25
+ export PASSWORDLESS_SUDO="1"
26
+else
27
+ export PASSWORDLESS_SUDO="0"
28
+fi
29
##Apperance
30
if [[ "$(tput colors 2>/dev/null | tr -d '[:space:]')" -eq 256 ]]; then
31
export TERM="xterm-256color"
@@ -311,6 +317,7 @@ export PATH
311
317
##FZF
312
318
if [[ "${NO_FZF}" != 1 ]]; then
313
319
if sudo -n true 2>/dev/null; then
320
+ if [[ "${PASSWORDLESS_SUDO}" == 1 ]]; then
314
321
if command -v batcat &>/dev/null && ! command -v bat &>/dev/null; then
315
322
sudo ln -s "$(realpath $(command -v batcat))" "${HOME}/.local/bin/bat"
316
323
fi
0 commit comments