mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 20:54:40 +08:00
abbr: Also show --position
(if not the default)
This commit is contained in:
parent
30a37d9433
commit
bb98cb01c7
|
@ -103,6 +103,10 @@ static int abbr_show(const abbr_options_t &, io_streams_t &streams) {
|
|||
comps.push_back(L"--regex");
|
||||
comps.push_back(escape_string(abbr.key));
|
||||
}
|
||||
if (abbr.position != abbrs_position_t::command) {
|
||||
comps.push_back(L"--position");
|
||||
comps.push_back(L"anywhere");
|
||||
}
|
||||
if (abbr.set_cursor_marker.has_value()) {
|
||||
comps.push_back(L"--set-cursor=" + escape_string(*abbr.set_cursor_marker));
|
||||
}
|
||||
|
|
|
@ -156,9 +156,11 @@ abbr --show
|
|||
|
||||
abbr --add nonregex_name foo
|
||||
abbr --add regex_name --regex 'A[0-9]B' bar
|
||||
abbr --add !! --position anywhere --function replace_history
|
||||
abbr --show
|
||||
# CHECK: abbr -a -- nonregex_name foo
|
||||
# CHECK: abbr -a --regex 'A[0-9]B' -- regex_name bar
|
||||
# CHECK: abbr -a --position anywhere --function -- !! replace_history
|
||||
abbr --erase (abbr --list)
|
||||
|
||||
abbr --add bogus --position never stuff
|
||||
|
|
Loading…
Reference in New Issue
Block a user