mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
lexicon_filter fix for escaped options
Fixes #1703. Also fixes short and long options markup in synopsis when directly following a '(' or '[' character.
This commit is contained in:
parent
5afd42c097
commit
8d3d51a020
2 changed files with 14 additions and 8 deletions
|
@ -120,6 +120,6 @@ Performs a history search when the @key{Page Up} key is pressed.
|
||||||
|
|
||||||
\fish
|
\fish
|
||||||
set -g fish_key_bindings fish_vi_key_bindings
|
set -g fish_key_bindings fish_vi_key_bindings
|
||||||
bind -M insert @args{@bksl{cc}} kill-whole-line force-repaint
|
bind -M insert \cc kill-whole-line force-repaint
|
||||||
\endfish
|
\endfish
|
||||||
Turns on Vi key bindings and rebinds @key{Control,C} to clear the input line.
|
Turns on Vi key bindings and rebinds @key{Control,C} to clear the input line.
|
||||||
|
|
|
@ -188,14 +188,14 @@ s/@sgst{\([^}]*\)}/\\\
|
||||||
#.
|
#.
|
||||||
# Command/Function options
|
# Command/Function options
|
||||||
# Short options
|
# Short options
|
||||||
s/ -\([A-Za-z][A-Za-z]*\)\([^A-Za-z}]\)/ \\\
|
s/\([[( ]\)-\([A-Za-z][A-Za-z]*\)\([^A-Za-z}]\)/\1\\\
|
||||||
<@opts{-\1}\
|
<@opts{-\2}\
|
||||||
\2/g
|
\3/g
|
||||||
#.
|
#.
|
||||||
# Long options
|
# Long options
|
||||||
s/ --\([A-Za-z][A-Za-z0-9=_-]*\)\([^A-Za-z0-9=_-]*\)/ \\\
|
s/\([[( ]\)--\([A-Za-z][A-Za-z0-9=_-]*\)\([^A-Za-z0-9=_-]*\)/\1\\\
|
||||||
<@opts{--\1}\
|
<@opts{--\2}\
|
||||||
\2/g
|
\3/g
|
||||||
#.
|
#.
|
||||||
# Prompt
|
# Prompt
|
||||||
s/~>_/\\\
|
s/~>_/\\\
|
||||||
|
@ -211,6 +211,9 @@ s/___\(.\)/\\\
|
||||||
<@curs{\1}\
|
<@curs{\1}\
|
||||||
/
|
/
|
||||||
#.
|
#.
|
||||||
|
# Escaped Options
|
||||||
|
s/ \\\([A-Za-z0-9][A-Za-z0-9]*\) / @bksl{\1} /g
|
||||||
|
#.
|
||||||
# Trailing Backslash
|
# Trailing Backslash
|
||||||
s/ \\$/ @bksl{ }/
|
s/ \\$/ @bksl{ }/
|
||||||
#.
|
#.
|
||||||
|
@ -447,7 +450,10 @@ s/\( *@redr{|} *\)@bltn/\1@xbln/g
|
||||||
s/^\( *\)@func/\1@xfnc/
|
s/^\( *\)@func/\1@xfnc/
|
||||||
s/\( *[;()] *\)@func/\1@xfnc/g
|
s/\( *[;()] *\)@func/\1@xfnc/g
|
||||||
s/\( *@redr{|} *\)@func/\1@xfnc/g
|
s/\( *@redr{|} *\)@func/\1@xfnc/g
|
||||||
s/\\@bltn{\([^}]*\)/@args{@bksl{\1}/g
|
s/ @bksl{\([^}]*\)} / @args{@bksl{\1}} /g
|
||||||
|
s/ @bksl{@bltn{\([^}]*\)}/ @args{@bksl{\1}/g
|
||||||
|
s/ @bksl{@func{\([^}]*\)}/ @args{@bksl{\1}/g
|
||||||
|
s/ @bksl{@cmnd{\([^}]*\)}/ @args{@bksl{\1}/g
|
||||||
s/@bltn/@args/g
|
s/@bltn/@args/g
|
||||||
s/@func/@args/g
|
s/@func/@args/g
|
||||||
s/@cmnd/@args/g
|
s/@cmnd/@args/g
|
||||||
|
|
Loading…
Reference in a new issue