-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added function overriding TAB to provide completion of vars before a …
…closing `"` (closes #1)
- Loading branch information
1 parent
27c449b
commit bb357bf
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function _pisces_complete -d "Invokes complete with modification for vars before a closing double quote" | ||
|
||
if commandline --paging-mode | ||
down-or-search | ||
else | ||
set token (commandline -t) | ||
# checking that the current token ends on a $var + '"' | ||
if [ (string match -r '\$.*"$' "$token") ] | ||
commandline -f delete-char # which is '"' | ||
end | ||
commandline -f complete | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters