From 2a595072bfa6b66280f1fd755ac564e8536e9a0c Mon Sep 17 00:00:00 2001 From: phone Date: Fri, 3 Nov 2023 01:19:16 +0300 Subject: [PATCH] bashrc : fix non-interactive shells. --- .bashrc | 3 +++ .linux/bash/module/git.sh | 37 +++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.bashrc b/.bashrc index 205cce6..0f9bd03 100755 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,8 @@ #!/bin/bash +# If not running interactively, don't do anything. +[[ "$-" != *i* ]] && return + #home="/var/home/voronind" home="${HOME}" module="${home}/.linux/bash/module/*.sh" diff --git a/.linux/bash/module/git.sh b/.linux/bash/module/git.sh index 4841878..3d7861d 100644 --- a/.linux/bash/module/git.sh +++ b/.linux/bash/module/git.sh @@ -73,26 +73,23 @@ gu() } # autocomplete. -# if is a fix for rsync. -if [[ $- = *i* ]]; then - _completion_loader git - __git_complete gps _git_push - __git_complete gpsf _git_push - __git_complete gpl _git_pull - __git_complete gl _git_log - __git_complete gs _git_status - __git_complete gst _git_stash - __git_complete gd _git_diff - __git_complete gc _git_commit - __git_complete gch _git_checkout - __git_complete gchb _git_checkout - __git_complete gb _git_branch - __git_complete gbd _git_branch - __git_complete gf _git_fetch - __git_complete gt _git_tag - __git_complete gp _git_apply - __git_complete ga _git_add -fi +_completion_loader git +__git_complete gps _git_push +__git_complete gpsf _git_push +__git_complete gpl _git_pull +__git_complete gl _git_log +__git_complete gs _git_status +__git_complete gst _git_stash +__git_complete gd _git_diff +__git_complete gc _git_commit +__git_complete gch _git_checkout +__git_complete gchb _git_checkout +__git_complete gb _git_branch +__git_complete gbd _git_branch +__git_complete gf _git_fetch +__git_complete gt _git_tag +__git_complete gp _git_apply +__git_complete ga _git_add _gu() {