File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ function _pisces_complete -d " Invokes complete with modification for vars before a closing double quote"
2+
3+ if commandline --paging-mode
4+ down-or-search
5+ else
6+ set token (commandline -t )
7+ # checking that the current token ends on a $var + '"'
8+ if [ (string match -r ' \ $.*"$' " $token " ) ]
9+ commandline -f delete-char # which is '"'
10+ end
11+ commandline -f complete
12+ end
13+ end
Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ function key_bindings
1111 bind \b _pisces_backspace
1212 # Terminal.app sends DEL code on ⌫:
1313 bind \ 177 _pisces_backspace
14+
15+ # overrides TAB to provide completion of vars before a closing '"'
16+ bind \t _pisces_complete
1417end
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ for pair in $pisces_pairs
44 end
55end
66
7- bind \b backward-delete-char
7+ bind \b backward-delete-char
88bind \ 177 backward-delete-char
9+ bind \t complete
910
1011set -e pisces_pairs
You can’t perform that action at this time.
0 commit comments