Comments (12)
Do you have git
in the array completions
defined in ~/.bashrc
? The completion module is only loaded when it is registered to the array completions
in ~/.bashrc
before sourcing oh-my-bash.sh
3. Source bashrc (which sources oh-my-bash.sh script)
Another possibility would be that the git
completion is loaded but the actual processing is kipped because a function __gitdir
is already defined. Did you source ~/.bashrc
in a session where OMB is already loaded? Could you check the behavior when you start a new Bash session?
from oh-my-bash.
Do you have
git
in the arraycompletions
defined in~/.bashrc
? The completion module is only loaded when it is registered to the arraycompletions
in~/.bashrc
before sourcingoh-my-bash.sh
Correct, git is in array completions, defined in bashrc.
Another possibility would be that the
git
completion is loaded but the actual processing is kipped because a function__gitdir
is already defined. Did you source~/.bashrc
in a session where OMB is already loaded? Could you check the behavior when you start a new Bash session?
I did check, same behavior, it only loads aliases on ~/.gitconfig, not commonly used commands like status and commit.
from oh-my-bash.
Thanks.
What is the result of the following command in the session where the completion settings are not correctly loaded?
$ complete -p git
Also, could you share the content of the custom git completion file (after your modification)?
from oh-my-bash.
What is the result of the following command in the session where the completion settings are not correctly loaded?
$ complete -p git
This is the result.
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main git
Also, could you share the content of the custom git completion file (after your modification)?
Sure, this is the content of ~/.ohmybash/custom/completions/git.completion.bash:
#! bash oh-my-bash.module
# bash completion support for Git.
function _omb_completion_git_initialize {
if ! _omb_util_function_exists __gitdir; then
local git_paths path
IFS=$'\n' read -r -d '' -a git_paths <<< "$(type -aP git)"
# Note: Falling back on /usr (should already be in the array)
git_paths+=("/nfs/devel/tools/git/2.35.2/bin/git")
for path in "${git_paths[@]}"; do
if [[ -L $path ]]; then
path=$(_omb_util_readlink "$path")
fi
# Note: In the case of symbolic link, the true binary name can
# contain prefix or suffix for architectures and versions.
path="${path%/*}"
local files
local prefix="${path%/bin}" file
_omb_util_glob_expand files '"$prefix"/share/{bash-completion/completions/git,{,doc/}git-*/contrib/completion/git-completion.bash}'
for file in "${files[@]}"; do
if [[ -f $file && -r $file && -s $file ]]; then
source "$file"
return $?
fi
done
done
source "$OSH/tools/git-completion.bash"
fi
}
_omb_completion_git_initialize
unset -f _omb_completion_git_initialize
from oh-my-bash.
Related Issues (20)
- Misleading comments for `chmod` aliases
- Terminal has missing symbol why iTerm does not HOT 2
- Anyon with the same error? Theme sexy HOT 2
- Docker completion is not up-to-date HOT 4
- brutally messed up omb installation HOT 1
- Hope to add Synth-shell. HOT 1
- Unknow font for this theme. HOT 4
- cannot update .ohmybash HOT 1
- Wrong shell expression output HOT 1
- problems with cd on sshfs mounted directory with git repositories HOT 2
- Problems with tmux > detaching or killing session HOT 1
- Allow for a way to not alter bash files directly, but to make changes that can be sourced HOT 3
- Robby russell theme issue HOT 2
- .bashrc is running twice when SSH into remote server HOT 4
- How to use "U+e0b6" () at the beginning of the prompt? HOT 1
- How to autocomplete the files with lsd instead of ls? HOT 1
- sudo: _omb_util_alias_init_mv: command not found HOT 5
- how to show the directory where the command was executed HOT 7
- Completion broken when sourcing file HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oh-my-bash.