fish-shell / fish-shell/fish-shell
Autocomplete pager references commands over functions
- Dominant language
- Rust
- Stars
- 34.2k
- Forks
- 2.4k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 13
Description
```fish
~> which man
/usr/bin/man
~> type man
mqudsi@ZBook /m/c/U/m/r/fish-shell> type man
fish: Caching description for function _: Alias for the gettext command
man is a function with definition
fish: Caching description for function isatty: Tests if a file descriptor is a tty
fish: Caching description for function alias: Creates a function wrapping a command
fish: Caching description for function fish_indent: alias fish_indent=/usr/local/bin/fish_indent
# Defined in /home/mqudsi/.config/fish/functions/man.fish @ line 1
function man --description 'an nvim wrapper for man'
set arg $argv[0..-1]
if not command man -w $arg >/dev/null 2>/dev/null
echo "No man page is available for '$arg'" 1>&2
return 1
end
if type -q nvim
nvim -u NORC -c ":set fileignorecase" -c ":Man $arg" -c ":silent :only" \
-c 'nunmap q' -c 'nmap q :q!' -c 'nmap ' \
-c ':call feedkeys("gg")'
else
command man $arg
end
end
~> man
man (Executable, 104kB) manage-bde.wsf (Executable, 874B) manpath (Determine search path for manual pages)
manage-bde.exe (Executable, 220kB) mandb (Create or update the manual page index caches)
```
The executable `man` is the item shown in the pager (as distinguished by its description), yet upon hitting enter it is the `man` function that will be executed.
Contributor guide
Assessment
This issue has not been assessed yet.