Pacman -S [tab] shows current directory files instead of application names

Hello
pacman -S [tab] shows current directory files instead of application names
i remember [tab] showed application names when i used gnome manjaro

Please provide Information:

What shell do you use ?

1 Like

sorry about that

System:
  Kernel: 5.15.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=d487b34b-b49d-4350-8f34-48620abdc248 rw quiet apparmor=1
    security=apparmor resume=UUID=777844fb-27b0-48ce-87ea-671f3abb2cca
    udev.log_priority=3
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1
    vt: 7 dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-P v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 3603
    date: 03/20/2021
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 31.32 GiB used: 2.19 GiB (7.0%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3
    family: 0x19 (25) model-id: 0x21 (33) stepping: 0 microcode: 0xA201009
  Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
    L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 6 MiB desc: 12x512 KiB
    L3: 64 MiB desc: 2x32 MiB
  Speed (MHz): avg: 2626 high: 3600 min/max: 2200/4950 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2876 2: 2879
    3: 2879 4: 2880 5: 3600 6: 2876 7: 2199 8: 2199 9: 2196 10: 2196 11: 2196
    12: 2196 13: 3595 14: 2877 15: 2874 16: 2875 17: 3595 18: 2871 19: 2199
    20: 2196 21: 2197 22: 2199 23: 2196 24: 2196 bogomips: 177650
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1660 SUPER] vendor: ASUSTeK
    driver: nvidia v: 510.47.03 alternate: nouveau,nvidia_drm bus-ID: 07:00.0
    chip-ID: 10de:21c4 class-ID: 0300
  Display: x11 server: X.Org 1.21.1.3 compositor: xfwm4 v: 4.16.1 driver:
    loaded: nvidia display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4000x1440 s-dpi: 96 s-size: 1058x381mm (41.7x15.0")
    s-diag: 1125mm (44.3")
  Monitor-1: HDMI-0 res: 1440x900 hz: 60 dpi: 122
    size: 300x230mm (11.8x9.1") diag: 378mm (14.9")
  Monitor-2: DP-0 res: 2560x1440 dpi: 93 size: 697x392mm (27.4x15.4")
    diag: 800mm (31.5")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: NVIDIA TU116 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 07:00.1 chip-ID: 10de:1aeb
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 09:00.4 chip-ID: 1022:1487
    class-ID: 0403
  Device-3: Kingston HyperX SoloCast type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 7-3:2 chip-ID: 0951:170f
    class-ID: 0300
  Sound Server-1: ALSA v: k5.15.19-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.20 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.45 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel port: f000
    bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 4.78 TiB used: 22.39 GiB (0.5%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Gigabyte model: GP-GSTFS31256GTND
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 61.3 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD40PURX-64N96Y0 size: 3.64 TiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A80 scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: Western Digital
    model: WD My Passport 25E1 size: 931.48 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1019 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 190.58 GiB size: 186.53 GiB (97.87%)
    used: 15.22 GiB (8.2%) fs: ext4 dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: d487b34b-b49d-4350-8f34-48620abdc248
  ID-2: /boot/efi raw-size: 2 GiB size: 2 GiB (99.80%) used: 25.7 MiB (1.3%)
    fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL uuid: 421A-FD50
  ID-3: /home raw-size: 1.5 TiB size: 1.47 TiB (98.36%)
    used: 7.15 GiB (0.5%) fs: ext4 dev: /dev/sdb1 maj-min: 8:17 label: N/A
    uuid: 8117bc5d-8c34-4dad-ab28-3ff9971f014a
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 45.9 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: 777844fb-27b0-48ce-87ea-671f3abb2cca
Unmounted:
  ID-1: /dev/sdb2 maj-min: 8:18 size: 1.16 TiB fs: ext4 label: N/A
    uuid: f7eb520b-e5d5-4b0d-bb77-86f31164d021
  ID-2: /dev/sdb3 maj-min: 8:19 size: 16 MiB fs: ext4 label: N/A
    uuid: 18467db7-1ef6-4f69-a66b-1db26a1ec96f
  ID-3: /dev/sdb4 maj-min: 8:20 size: 1003.86 GiB fs: ntfs label: N/A
    uuid: 8C96540D9653F5E4
  ID-4: /dev/sdc1 maj-min: 8:33 size: 931.48 GiB fs: ntfs label: My Passport
    uuid: 369E7DDB9E7D93D9
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: USB OPTICAL MOUSE type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 0000:3825 class-ID: 0301
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-3:2 info: SiGma Micro Keyboard TRACER Gamma Ivory
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 1.1
    speed: 1.5 Mb/s power: 98mA chip-ID: 1c4f:0002 class-ID: 0300
  Device-2: 3-4:3 info: USB OPTICAL MOUSE type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 0000:3825 class-ID: 0301
  Device-3: 3-5:4 info: Western Digital My Passport (WD20NMVW)
    type: Mass Storage driver: usb-storage interfaces: 1 rev: 2.1
    speed: 480 Mb/s power: 500mA chip-ID: 1058:25e1 class-ID: 0806
    serial: <filter>
  Device-4: 3-6:5 info: ASUSTek AURA LED Controller type: HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 16mA
    chip-ID: 0b05:18f3 class-ID: 0300 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-5: 5-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-6: 6-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-7: 7-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 7-3:2 info: Kingston HyperX SoloCast type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 3 rev: 1.1
    speed: 12 Mb/s power: 100mA chip-ID: 0951:170f class-ID: 0300
  Hub-8: 8-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 48 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 26%
Info:
  Processes: 380 Uptime: 9m wakeups: 0 Init: systemd v: 250 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: 1244 pacman: 1239 lib: 417
  flatpak: 0 snap: 5 Shell: Bash v: 5.1.16 running-in: alacritty inxi: 3.3.12

echo "$SHELL" => /bin/bash

$ sudo pacman -S [tab]
albiononline/         .gnome/               .steampath
.bash_history         .gnupg/               .steampid
.bash_logout          .ICEauthority         Templates/
.bash_profile         .local/               Videos/
.bashrc               .mozilla/             .Xauthority
.cache/               Music/                .Xclients
.cargo/               .nanorc               .xinitrc
.config/              Pictures/             .xsession-errors
Desktop/              .pki/                 .xsession-errors.old
.dir_colors           .profile              .zshenv
.dmrc                 Public/               .zshrc
Documents/            .rustup/
Downloads/            .steam/

how can i enable auto completion for my pacman -S ?

Install bash-completion package and share the contents of ~/.bashrc.

1 Like

i installed bash-completion

#
# ~/.bashrc
#

[[ $- != *i* ]] && return

colors() {
	local fgc bgc vals seq0

	printf "Color escapes are %s\n" '\e[${value};...;${value}m'
	printf "Values 30..37 are \e[33mforeground colors\e[m\n"
	printf "Values 40..47 are \e[43mbackground colors\e[m\n"
	printf "Value  1 gives a  \e[1mbold-faced look\e[m\n\n"

	# foreground colors
	for fgc in {30..37}; do
		# background colors
		for bgc in {40..47}; do
			fgc=${fgc#37} # white
			bgc=${bgc#40} # black

			vals="${fgc:+$fgc;}${bgc}"
			vals=${vals%%;}

			seq0="${vals:+\e[${vals}m}"
			printf "  %-9s" "${seq0:-(default)}"
			printf " ${seq0}TEXT\e[m"
			printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
		done
		echo; echo
	done
}

[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion

# Change the window title of X terminals
case ${TERM} in
	xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
		;;
	screen*)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
		;;
esac

use_color=true

# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS.  Try to use the external file
# first to take advantage of user additions.  Use internal bash
# globbing instead of external grep binary.
safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
match_lhs=""
[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs}    ]] \
	&& type -P dircolors >/dev/null \
	&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true

if ${use_color} ; then
	# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
	if type -P dircolors >/dev/null ; then
		if [[ -f ~/.dir_colors ]] ; then
			eval $(dircolors -b ~/.dir_colors)
		elif [[ -f /etc/DIR_COLORS ]] ; then
			eval $(dircolors -b /etc/DIR_COLORS)
		fi
	fi

	if [[ ${EUID} == 0 ]] ; then
		PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
	else
		PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
	fi

	alias ls='ls --color=auto'
	alias grep='grep --colour=auto'
	alias egrep='egrep --colour=auto'
	alias fgrep='fgrep --colour=auto'
else
	if [[ ${EUID} == 0 ]] ; then
		# show root@ when we don't have colors
		PS1='\u@\h \W \$ '
	else
		PS1='\u@\h \w \$ '
	fi
fi

unset use_color safe_term match_lhs sh

#alias cp="cp -i"                          # confirm before overwriting something
#alias df='df -h'                          # human-readable sizes
#alias free='free -m'                      # show sizes in MB
#alias np='nano -w PKGBUILD'
#alias more=less

xhost +local:root > /dev/null 2>&1

# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.  #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize

shopt -s expand_aliases

# export QT_SELECT=4

# Enable history appending instead of overwriting.  #139609
shopt -s histappend

#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
  if [ -f $1 ] ; then
    case $1 in
      *.tar.bz2)   tar xjf $1   ;;
      *.tar.gz)    tar xzf $1   ;;
      *.bz2)       bunzip2 $1   ;;
      *.rar)       unrar x $1     ;;
      *.gz)        gunzip $1    ;;
      *.tar)       tar xf $1    ;;
      *.tbz2)      tar xjf $1   ;;
      *.tgz)       tar xzf $1   ;;
      *.zip)       unzip $1     ;;
      *.Z)         uncompress $1;;
      *.7z)        7z x $1      ;;
      *)           echo "'$1' cannot be extracted via ex()" ;;
    esac
  else
    echo "'$1' is not a valid file"
  fi
}
. "$HOME/.cargo/env"

Can you try removing this line and do source ~/.bashrc. The default manjaro .bashrc doesn’t contain that:

its from rust dev package
i removed it but it doesnt show application names when i type pacman -S [tab]