Rename abbreviation cursor "sentinel" to "marker"

Also default the marker to '%'. So you may write:

    abbr -a L --position anywhere --set-cursor "% | less"

or set an explicit marker:

   abbr -a L --position anywhere --set-cursor=! "! | less"
This commit is contained in:
ridiculousfish
2022-11-27 14:33:35 -08:00
parent 01039537b0
commit e08f4db1f9
5 changed files with 45 additions and 37 deletions

View File

@@ -143,7 +143,14 @@ expect_prompt(r"6 : @abc@ ")
# Test cursor positioning.
sendline(r"""abbr --erase (abbr --list) """)
expect_prompt()
sendline(r"""abbr LLL --position anywhere --set-cursor !HERE! '!HERE! | less'""")
sendline(r"""abbr LLL --position anywhere --set-cursor 'abc%ghi'""")
expect_prompt()
send(r"""echo LLL def?""")
expect_str(r"<echo abcdefghi >")
sendline(r"""abbr --erase (abbr --list) """)
expect_prompt()
sendline(r"""abbr LLL --position anywhere --set-cursor=!HERE! '!HERE! | less'""")
expect_prompt()
send(r"""echo LLL derp?""")
expect_str(r"echo derp | less ")
expect_str(r"<echo derp | less >")