I Installed Bash Completion from Fedora repository. however, I can’t see it working. I read some bash completion github and it says "If you have profile.d in your distribution, you dont have to source /etc/profile.d/bash_completion.sh.
the funny thing is.. bash can complete my command and files. ie if i type
In the first example, the command name is completed with the completion script and there are two suggestions.
In the second example, there’s nothing to complete - the command name is already given (git) and you’ve given it one parameter. Pressing Tab does nothing as there’s no ambiguous command to complete.
I use fish and it has more robust completion, which I suspect is what you’re after. For example, typing git and pressing tab offers the last parameter to git that I used and also all other appropriate parameters, along with their description; I can move around the list or continue typing after being given the reminder of what could come next.
┌─🎩 lurcher rlencoder on master [!+] +33−3
├─via 🦀 v1.94.0-beta.3 pkg 📦 v0.1.0
└─➜ git status 12:34 Fri 20-Feb
add (Add file contents to the staging area) merge (Join multiple development histories)
am (Apply patches from a mailbox) mergetool (Run merge conflict resolution tool)
apply (Apply a patch) merge-base (Find a common ancestor for a merge)
archive (Create an archive of files from a tree) mv (Move or rename a file)
bisect (Use binary search to find what introduced a bug) notes (Add or inspect object notes)
blame (Show what last modified each line of a file) prune (Prune unreachable objects from the database)
branch (List, create, or delete branches) pull (Fetch from and merge with another repo or branch)
bundle (Create, unpack, and manipulate "bundle" files) push (Push changes elsewhere)
checkout (Checkout and switch to a branch) range-diff (Compare two commit ranges)
cherry (Find commits yet to be applied to upstream) rebase (Reapply commit sequence on a new base)
cherry-pick (Reapply a commit on another branch) reflog (Manage reflog information)
clean (Remove untracked files from the working tree) remote (Manage tracked repositories)
clone (Clone a repository into a new directory) reset (Reset current HEAD to the specified state)
commit (Record changes to the repository) restore (Restore working tree files)
config (Set and read git configuration variables) revert (Revert an existing commit)
count-objects (Count number of objects and disk consumption) rev-list (List commits in chronological order)
daemon (A simple server for git repositories) rev-parse (Parse revision names or give repo information)
describe (Give an object a human readable name) rm (Remove files from the working tree and/or staging area)
…and 15 more rows
and then relogin, it’s still the same.. so I tried restart..
still it won’t do it’s thing. I have this problem almost a week. I searched many forums and got no luck.
The code you’re running in /etc/profile.d looks like this, I presume:
# shellcheck shell=sh disable=SC1091,SC2166,SC2268,SC3028,SC3044,SC3054
# Check for interactive bash and that we haven't already been sourced.
if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then
# Check for recent enough version of bash.
if [ "${BASH_VERSINFO[0]}" -gt 4 ] ||
[ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] &&
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
# Source completion code.
. /usr/share/bash-completion/bash_completion
fi
fi
fi
Are you sure it’s actually executing and firing /usr/share/bash-completion/bash_completion and that called script has the correct permissions and so on?
yes, I have the same content of /etc/profile.d/bash_completion like you. all files in /etc/profile.d have 644 permission except for 70-systemd-shell-extra.sh and 80-systemd-osc-context.sh. I don’t think they need +1 because it just get sourced, not executed.
hi, I don’t know what tags to add that may be useful. but I can tell you my setup
I have f43 installed from fedora-everything, I choose to install xfce desktop then I remove lightdm and replaced it with greetd. also I installed hyprland from copr then here I am now
at first, I was thought it’s greetd fault so I replaced it with sddm. but it still not working.