[SOLVED] how do you get the terminal to predict commands?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
luca72
Level 2
Level 2
Posts: 97
Joined: Sat Apr 17, 2021 3:10 pm
Location: Milano, Italy

[SOLVED] how do you get the terminal to predict commands?

Post by luca72 »

hi everyone, how do you get the terminal to predict commands as you type (like t9)? i've seen in various videos that use tabs and arrows, but nothing happens here
thank you

Code: Select all

System:
  Kernel: 5.8.0-50-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: HP product: HP Laptop 15-dw0xxx 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 
  serial: <filter> 
  Mobo: HP model: 85F0 v: 36.41 serial: <filter> UEFI: Insyde v: F.43 
  date: 03/31/2021 
Battery:
  ID-1: BAT1 charge: 9.3 Wh condition: 11.9/41.0 Wh (29%) volts: 12.1/11.4 
  model: Hewlett-Packard PABAS0241231 type: Li-ion serial: <filter> 
  status: Discharging 
CPU:
  Topology: Quad Core model: Intel Core i7-8565U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: B L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 31999 
  Speed: 800 MHz min/max: 400/4600 MHz Core speeds (MHz): 1: 744 2: 751 
  3: 756 4: 732 5: 796 6: 752 7: 767 8: 757 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:3ea0 
  Device-2: NVIDIA GM108M [GeForce MX130] driver: nvidia v: 460.73.01 
  bus ID: 01:00.0 chip ID: 10de:174d 
  Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa tty: N/A 
  OpenGL: renderer: GeForce MX130/PCIe/SSE2 v: 4.6.0 NVIDIA 460.73.01 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio 
  vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  chip ID: 8086:9dc8 
  Device-2: Yamaha type: USB driver: snd-usb-audio bus ID: 1-2.1:4 
  chip ID: 0499:170d 
  Sound Server: ALSA v: k5.8.0-50-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: kernel port: 4000 bus ID: 02:00.0 
  chip ID: 10ec:8168 
  IF: eno1 state: down mac: <filter> 
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
  vendor: Hewlett-Packard driver: rtl8821ce v: v5.5.2.1_35598.20191029 
  port: 3000 bus ID: 03:00.0 chip ID: 10ec:c821 
  IF: wlo1 state: up mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 95.37 GiB (20.0%) 
  ID-1: /dev/nvme0n1 vendor: Western Digital 
  model: PC SN520 SDAPNUW-512G-1006 size: 476.94 GiB speed: 15.8 Gb/s 
  lanes: 2 serial: <filter> rev: 20110006 scheme: GPT 
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
  v: 3.0 port: 6060 bus ID: 00:17.0 chip ID: 8086.282a rev: 30 
Partition:
  ID-1: / size: 169.88 GiB used: 95.30 GiB (56.1%) fs: ext4 
  dev: /dev/nvme0n1p5 
Sensors:
  System Temperatures: cpu: 43.0 C mobo: 29.8 C gpu: nvidia temp: 39 C 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/mkusb-ppa-focal.list 
  1: deb http://ppa.launchpad.net/mkusb/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:
  Processes: 268 Uptime: 1m Memory: 7.66 GiB used: 2.38 GiB (31.1%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: how do you get the terminal to predict commands?

Post by Flemur »

luca72 wrote: Sat May 01, 2021 6:32 pm hi everyone, how do you get the terminal to predict commands as you type (like t9)? i've seen in various videos that use tabs and arrows, but nothing happens here
thank you
With bash, which you're probably using, hit TAB twice, sometimes, like

Code: Select all

$ li TAB TAB
libnetcfg                    lintian                      linux-version
libwacom-list-local-devices  lintian-info      ...
to see those commands; then add, say, an n, like lin TAB TAB.

If two tabs doesn't do it, check your ~/.bashrc file to make sure it has something like this:

Code: Select all

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
luca72
Level 2
Level 2
Posts: 97
Joined: Sat Apr 17, 2021 3:10 pm
Location: Milano, Italy

Re: how do you get the terminal to predict commands?

Post by luca72 »

Flemur wrote: Sat May 01, 2021 9:47 pm
luca72 wrote: Sat May 01, 2021 6:32 pm hi everyone, how do you get the terminal to predict commands as you type (like t9)? i've seen in various videos that use tabs and arrows, but nothing happens here
thank you
With bash, which you're probably using, hit TAB twice, sometimes, like

Code: Select all

$ li TAB TAB
libnetcfg                    lintian                      linux-version
libwacom-list-local-devices  lintian-info      ...
to see those commands; then add, say, an n, like lin TAB TAB.

If two tabs doesn't do it, check your ~/.bashrc file to make sure it has something like this:

Code: Select all

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile


hello, thanks, inside the file, it actually says the same thing you sent, maybe I was wrong, I pressed TAB only once, instead of TAB TAB. 
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
Locked

Return to “MATE”