小编ale*_*kin的帖子

如何通过最近的 bash 完成重新使用现有的完成?

我使用别名向某些程序添加一些参数。

例如:

alias git.home='git --git-dir=$HOME/.git.home/'

complete -o bashdefault -o default -o nospace -F _git git.home \
  2>/dev/null || complete -o default -o nospace -F _git git.home
Run Code Online (Sandbox Code Playgroud)

它与bash-completion v.1:2.0-1("debian 7 wheezy") 一起使用:
tab完成alias git.home和 "original" 的参数和选项git

但是bash-completion v.1:2.1-4在输入git.home并按下后(“debian 8 jessie”),tab我收到此错误:

bash:完成:找不到函数`_git'

如何在git最新版本的包中重新使用现有的完成(例如 for )bash-completion


更新

找到部分解决方案:source /usr/share/bash-completion/completions/git之前做complete ...

但我收到另一个错误 - git.home log+ space+tab结果:

致命:不是 git …

bash debian autocomplete

7
推荐指数
2
解决办法
1193
查看次数

蓝牙耳机无法自动连接 (Ubuntu)

我的 Bluedio T4 耳机无法在 Ubuntu Linux 20.04 LTS 中自动连接

该设备是受信任的,并在 PulseAudio /etc/pulse/default.pa 中启用。使用 Wireshark 我可以看到它很快就连接到了控制器。然而,几毫秒后,它会发送一个断开连接请求,并且设备相应地断开连接。

$ bluetoothctl info 17:07:11:00:00:00
Device 17:07:11:DD:0D:27 (public)
    Name: Bluedio T
    Alias: Bluedio T
    Class: 0x00240404
    Icon: audio-card
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f000000)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f000000)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f000000)
    UUID: Handsfree                 (0000111e-0000-1000-8000-00805f000000)
Run Code Online (Sandbox Code Playgroud)
$ cat /etc/pulse/default.pa | grep -B 1 -A 1 module-switch-on-connect
### Use hot-plugged devices like Bluetooth or USB automatically (LP: …
Run Code Online (Sandbox Code Playgroud)

ubuntu bluetooth blueman

4
推荐指数
1
解决办法
4586
查看次数

标签 统计

autocomplete ×1

bash ×1

blueman ×1

bluetooth ×1

debian ×1

ubuntu ×1