Fixed a few more edge cases

This commit is contained in:
Mark Griffiths 2014-08-19 10:58:22 +01:00
parent 855a119654
commit 73fb9915fd
2 changed files with 37 additions and 21 deletions

View file

@ -180,7 +180,7 @@ It knows about paths and options:
And history too. Type a command once, and you can re-summon it by just typing a few letters:
\fish{cli-dark}
>_ r<s>__sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo</s>
>_ <error>r</error><s>__sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo</s>
\endfish
To accept the autosuggestion, hit right arrow or @key{Control,F}. To accept a single word of the autosuggestion, @key{Alt,&rarr;} (right arrow). If the autosuggestion is not what you want, just ignore it.

View file

@ -223,7 +223,7 @@ s/__\(.\)/\\\
# Normal Directory
s|mkdir |mkdir :|
s|\([~/:][/]*[.A-Za-z_0-9/-]*\)\\ |\1=|g
s|\([~/][/]*[.A-Za-z_0-9/=-]*\)|\\\
s|\([~/:][/]*[.A-Za-z_0-9/=-]*\)|\\\
<@path{\1}\
|g
t protect
@ -275,6 +275,16 @@ s/^PCLN: //
s/\(blah{[^@]*\)@dblq{\([^}]*\)}/\1"\2"/
s/\(blah{[^@]*\)@....{\([^}]*\)}/\1\2/
}
/@dblq/{
:cleandblq
s/\(dblq{[^@<]*\)<*@...[^q]{\([^}]*\)}/\1\2/
t cleandblq
}
/@sglq/{
:cleansglq
s/\(sglq{[^@<]*\)<*@...[^q]{\([^}]*\)}/\1\2/
t cleansglq
}
/@redr/{
:cleanredr
s/\(redr{[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
@ -284,11 +294,13 @@ s/^PCLN: //
s/\(redr{[^}]*\)}\( *\)@path{\([^}]*\)/\1\2\3/
t cleanredr
}
/@sgst/ {
/@sgst/{
s/@sgst{<@/@sgst{@/
:cleansgst
s/\(sgst{@curs{.}[^@]*\)@cmnd{\([^}]*\)}/\1\2/
s/\(sgst{@curs{.}[^@]*\)@sbin{\([^}]*\)}/\1\2/
s/\(sgst{@curs{.}[^@]*\)@path{\([^}]*\)}/\1\2/
s/\(sgst{@curs{.}[^@]*\)@fsfo{\([^}]*\)}/\1\2/
t cleansgst
}
/@fsfo/{
@ -298,6 +310,9 @@ s/^PCLN: //
s/\(fsfo{[^@}]*\)@sbin{\([^}]*\)}/\1\2/
t cleanfsfo
}
/@prmt{/{
s/@prmt{<@path/@prmt{@path/
}
#.
# Restore Paths
/@fsfo/ {
@ -397,26 +412,27 @@ s/\n$//g
# additional trailing characters stripped.
x
/^\<@[^}]*$/ ! {
s/[^\<]*//
s/^ *\\\n//
s/[()] \\//
s/\n *\\//
s/^[^\<][^@][^\\]*//
s/\n[]|;) ][^\\]*\\//
s/\n[]|;) a-zA-z0-9-][^\\]*$//
s/\n[]|;)}]\\//
s/\n[]|;)}]\n//
s/\n[]|;)}]$//
s/[()]$//
s/}@curs/}/
s/\n@curs$//
s/\n[^\<@][^\\]*\\//
s/\n[^\<@][^\\]*//
s/^\\//
s/\n$//g
s/[^\<]*//
s/^ *\\\n//
s/[()] \\//
s/\n *\\//
s/^[^\<][^@][^\\]*//
s/\n[]|;) ][^\\]*\\//
s/\n[]|;) a-zA-z0-9-][^\\]*$//
s/\n[]|;)}]\\//
s/\n[]|;)}]\n//
s/\n[]|;)}]$//
s/[()]$//
s/}@curs/}/
s/\n@curs$//
s/\n[^\<@][^\\]*\\//
s/\n[^\<@][^\\]*//
s/^\\//
s/\n$//g
}
s/\\\n/\
/
}
s/\< \n//
#.
# Swap the buffers back.
x