I have recently switched to fish shell, and its autocomplete is really nice.
However, I find myself wanting to use tab to use the complete_autocomplete feature, as opposed to when it's unambiguous. The forward and end keys both do this, but they're out of reach of my fingers in a normal typing position.
I would love to use the Capslock key for this, as I never ever use that key but it's in such a nice position.
I've tried setxkbmap -option caps:none
but that seems to disable the capslock key entirely. I suppose I could bind it to the forward or end key but I'm not sure how to do this either.
Also, I can't seem to find a key binding in fish shell for capslock:
cowpig@gerty:~$ bind -K
b2
backspace
btab
dc
down
end
enter
f1
f2
f3
f4
f5
f6
f7
f8
f9
f10
f11
f12
f13
f14
f15
f16
f17
f18
f19
f20
home
ic
left
npage
ppage
right
sdc
send
sf
shome
sic
sleft
snext
sprevious
sr
sright
up
Best Answer
First, check the manual because I think that Ctrl + F will also autocomplete. You can see it typing
help
in fish.If you want to go ahead with the mapping, run
xev
and press capslock to get the keycode. Mine is 66:Now create a script (i.e. ~/xmodmap.sh) with permission 755 and the following text:
Run the script and it will convert the capslock into the End key.
To make this permanent, add this command to the startup applications:
I've tried it with the fish shell and it does auto complete the command.
I use Alt Gr to map some keys to closer positions: Customize keyboard layout including navigation keys