fork/fish-shell

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

Johannes AltmanningerPrepare to not localize private function descriptionsd835c5252

master
754 B28 linesraw
1# localization: tier1
2function down-or-search -d "search forward or move down 1 line"
3    # If we are already in search mode, continue
4    if commandline --search-mode
5        commandline -f history-search-forward
6        return
7    end
8
9    # If we are navigating the pager, then up always navigates
10    if commandline --paging-mode
11        commandline -f down-line
12        return
13    end
14
15    # We are not already in search mode.
16    # If we are on the bottom line, start search mode,
17    # otherwise move down
18    set -l lineno (commandline -L)
19    set -l line_count (count (commandline))
20
21    switch $lineno
22        case $line_count
23            commandline -f history-search-forward
24
25        case '*'
26            commandline -f down-line
27    end
28end