fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

ccoVeilleFix typos in completions scripts0df6fa791

master
1.4 KiB26 linesraw
1function __fish_print_console_keymaps
2    # The path(s) used may differ by linux distribution, and are compiled into
3    # loadkeys, which doesn't provide a way to check which paths are searched
4    # or which keymaps it can find. localectl can list keymaps, but is part of
5    # systemd, which we shouldn't depend on.
6
7    set -l dirs /usr/share/kbd/keymaps /usr/share/keymaps /usr/lib/kbd/keymaps /lib/kbd/keymaps /usr/src/linux/drivers
8
9    path filter -f $dirs/** | string replace -rf '.*/(.*)\.k?map(|\..*)$' '$1'
10end
11
12complete -fc loadkeys -a "(__fish_print_console_keymaps)"
13
14complete -c loadkeys -s C -l console -d "Console device to use" -x -a "(path filter --type=char /dev/tty*)"
15complete -c loadkeys -s a -l ascii -d "Force conversion to ASCII"
16complete -c loadkeys -s b -l bkeymap -d "Output binary keymap"
17complete -c loadkeys -s c -l clearcompose -d "Clear kernel compose table"
18complete -c loadkeys -s d -l default -d "Load default keymap"
19complete -c loadkeys -s m -l mktable -d "Output a 'defkeymap.c'"
20complete -c loadkeys -s p -l parse -d "Only search and parse keymap"
21complete -c loadkeys -s s -l clearstrings -d "Clear kernel string table"
22complete -c loadkeys -s u -l unicode -d "Force conversion to Unicode"
23complete -c loadkeys -s q -l quiet -d "Suppress all normal output"
24complete -c loadkeys -s v -l verbose -d "Be more verbose"
25complete -c loadkeys -s V -l version -d "Print version number"
26complete -c loadkeys -s h -l help -d "Print help"