Cannot use "!"

hello, im on garuda linux kde-lite
i installed this OS since i want things lite and nice, but i noticed i cannot use "!!"
this means i could not run a previous command instantly, like for example lets say i run pacman -Syu without the sudo i can just run sudo !! to run the pacman command to just run it instantly.

please help me with support since i dont know what to do

Welcome to the forum
Can you provide your

garuda-inxi

as per the forum template

1 Like
System:
  Kernel: 5.18.12-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=312bcb0b-c2cf-4d25-8e1e-6407e2358382 rw [email protected]
    quiet loglevel=3 sysrq_always_enabled=1
    systemd.unified_cgroup_hierarchy=1
  Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1
    dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: NEC product: PC-VK27MDZEJ v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: NEC model: Justice3-SH v: 3A3B serial: <superuser required>
    UEFI: NEC v: NOTE Version /745A2304 date: 10/23/2014
Battery:
  ID-1: BAT1 charge: 14.9 Wh (100.0%) condition: 14.9/24.3 Wh (61.5%)
    volts: 3.8 min: 10.8 model: NEC PC-VP-WP135/OP-570-77018 type: Li-ion
    serial: N/A status: full
CPU:
  Info: model: Intel Core i5-4310M bits: 64 type: MT MCP arch: Haswell
    gen: core 4 built: 2013-15 process: Intel 22nm family: 6
    model-id: 0x3C (60) stepping: 3 microcode: 0x28
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2691 high: 2694 min/max: 800/3400 scaling:
    driver: intel_cpufreq governor: performance cores: 1: 2690 2: 2689 3: 2692
    4: 2694 bogomips: 21548
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Lenovo
    driver: i915 v: kernel arch: Gen5.75 process: Intel 45nm built: 2010 ports:
    active: VGA-1,eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:0416
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2806x900 s-dpi: 96 s-size: 742x238mm (29.21x9.37")
    s-diag: 779mm (30.68")
  Monitor-1: VGA-1 pos: right model: Lenovo L197 Wide serial: <filter>
    built: 2009 res: 1440x900 hz: 60 dpi: 89 gamma: 1.2
    size: 410x257mm (16.14x10.12") diag: 484mm (19.1") ratio: 16:10 modes:
    max: 1440x900 min: 720x400
  Monitor-2: eDP-1 pos: primary,left model: LG Display 0x038e built: 2013
    res: 1366x768 hz: 60 dpi: 101 gamma: 1.2 size: 344x194mm (13.54x7.64")
    diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
  OpenGL: renderer: Mesa Intel HD Graphics 4600 (HSW GT2)
    v: 4.6 Mesa 22.1.3 direct render: Yes
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 00:03.0
    chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20
    class-ID: 0403
  Sound Server-1: ALSA v: k5.18.12-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel Ethernet I217-LM vendor: Lenovo driver: e1000e v: kernel
    port: 4080 bus-ID: 00:19.0 chip-ID: 8086:153a class-ID: 0200
  IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wireless 7260 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:08b1 class-ID: 0280
  IF: wlp4s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 3-7:5 chip-ID: 8087:07dc class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 465.76 GiB used: 47.39 GiB (10.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD5000LPVX-08V0TT5 size: 465.76 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A05 scheme: GPT
Partition:
  ID-1: / raw-size: 241.19 GiB size: 241.19 GiB (100.00%)
    used: 47.36 GiB (19.6%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 38.7 MiB (40.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 241.19 GiB size: 241.19 GiB (100.00%)
    used: 47.36 GiB (19.6%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-4: /var/log raw-size: 241.19 GiB size: 241.19 GiB (100.00%)
    used: 47.36 GiB (19.6%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-5: /var/tmp raw-size: 241.19 GiB size: 241.19 GiB (100.00%)
    used: 47.36 GiB (19.6%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 7.67 GiB used: 1.03 GiB (13.5%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 73.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 245 Uptime: 4h 32m wakeups: 4 Memory: 7.67 GiB
  used: 4.47 GiB (58.3%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 Packages: pacman: 1686 lib: 491
  Shell: fish v: 3.4.1 running-in: kitty inxi: 3.3.19
pacman: /usr/lib/steam/libcurl.so.4: no version information available (required by /usr/lib/libalpm.so.13)
Garuda (2.6.5-1):
  System install date:     2022-07-22
  Last full system update: 2022-07-23
  Is partially upgraded:   Yes
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:            systemd-vconsole-setup.service

hello, sorry

What does
localectl status
say

   System Locale: LANG=en_SG.UTF-8
       VC Keymap: us
      X11 Layout: us

This is fish, not supporting history expansion.
See eg

If it is really importante, you should change Shell. For sure bash does it.

2 Likes

Is that the language you use as

defaults to us if that is not loaded by systemd

1 Like

oh what, i didnt know fish didnt have it, since ive used dragonized version of garuda before, i thought it used fish and it worked fine using it, didnt know it didnt support it

You see also here. It's a very old discussion, still with recent "mentions", i e. links in other issues.

oh i see now, garuda dragonized uses oh my fish using the bang-bang plugin, thats how they managed to do it, thank you for the help, i managed to fix the issue

2 Likes

Have a look at our fish config, it contains a function needed to use "!!" :slight_smile:

3 Likes

BTW. From Download Page.

Garuda Linux KDE lite is made for users who do not want extra software and functionalities and complain about bloat. It contains only the bare minimum of packages needed to get started. (You are on your own, we do not provide any support for KDE lite editions!)

We mark the solution here, not the implementation.
Thanks :slight_smile:

2 Likes

On KDE lite, ~/.config/fish/config.fish starts off as an empty file. The fully-loaded config is available in the skeleton and you can just copy it over:

cp /etc/skel/.config/fish/config.fish ~/.config/fish/config.fish

This file contains the function you are looking for:

# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
 function __history_previous_command
   switch (commandline -t)
   case "!"
     commandline -t $history[1]; commandline -f repaint
   case "*"
     commandline -i !
   end
 end
  
function __history_previous_command_arguments
   switch (commandline -t)
   case "!"
     commandline -t ""
     commandline -f history-token-search-backward
   case "*"
     commandline -i '$'

After that, the function works fine (no plugins necessary).

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.