bashrc : fix non-interactive shells.

This commit is contained in:
Dmitry Voronin 2023-11-03 01:19:16 +03:00
parent ad1e5cc22c
commit 2a595072bf
2 changed files with 20 additions and 20 deletions

View file

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# If not running interactively, don't do anything.
[[ "$-" != *i* ]] && return
#home="/var/home/voronind" #home="/var/home/voronind"
home="${HOME}" home="${HOME}"
module="${home}/.linux/bash/module/*.sh" module="${home}/.linux/bash/module/*.sh"

View file

@ -73,26 +73,23 @@ gu()
} }
# autocomplete. # autocomplete.
# if is a fix for rsync. _completion_loader git
if [[ $- = *i* ]]; then __git_complete gps _git_push
_completion_loader git __git_complete gpsf _git_push
__git_complete gps _git_push __git_complete gpl _git_pull
__git_complete gpsf _git_push __git_complete gl _git_log
__git_complete gpl _git_pull __git_complete gs _git_status
__git_complete gl _git_log __git_complete gst _git_stash
__git_complete gs _git_status __git_complete gd _git_diff
__git_complete gst _git_stash __git_complete gc _git_commit
__git_complete gd _git_diff __git_complete gch _git_checkout
__git_complete gc _git_commit __git_complete gchb _git_checkout
__git_complete gch _git_checkout __git_complete gb _git_branch
__git_complete gchb _git_checkout __git_complete gbd _git_branch
__git_complete gb _git_branch __git_complete gf _git_fetch
__git_complete gbd _git_branch __git_complete gt _git_tag
__git_complete gf _git_fetch __git_complete gp _git_apply
__git_complete gt _git_tag __git_complete ga _git_add
__git_complete gp _git_apply
__git_complete ga _git_add
fi
_gu() _gu()
{ {