diff options
| author | Teddy Wing | 2021-08-07 19:53:12 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-08-07 19:53:12 +0200 | 
| commit | df2d935925498bba66a27bd51819ab0b9200863c (patch) | |
| tree | 9c0bb17f733cb5efd2e5cb291b454eb5080b13e1 | |
| parent | 7250469c78b98a124e844ea6733d188695d2b888 (diff) | |
| download | readline-incdec-df2d935925498bba66a27bd51819ab0b9200863c.tar.bz2 | |
incdec: Ideas for bindings and getting point location
A long time ago, I was trying to get this to work, but wasn't able to.
Commit the code from then.
Not really sure exactly what that was about now.
| -rw-r--r-- | incdec | 18 | 
1 files changed, 18 insertions, 0 deletions
| @@ -17,5 +17,23 @@ function incdec {  	echo "$(($number + 1))"  } +function __readline_incdec_incdec2 { +	# echo "!!" +	echo !# +} +  # bind -x '"\C-xa+":incdec'  # bind '"\C-xaa":\C-xa+' + +function __readline_incdec_save_readline_point { +	__readline_incdec_readline_point="$READLINE_POINT" +} + +bind -x '"\C-xasrp": __readline_incdec_save_readline_point' + +# bind '"\C-xaa": \C-xasrp\C-c$(__readline_incdec_incdec2)\e\C-e' +# bind '"\C-xaa": \C-xasrp' +bind '"\C-xaa": __readline_incdec_incdec2' + + +# 2021.01.15: Idea: Maybe try using $EDITOR | 
