I forgot the array syntax in Zsh-commandline:
$ hello=[1,2,3,4] %ERR:
I want to fix the problem by replacing. In Vim, I would do : .s@ ,@ @g . So, how can I edit the current line or give it a call to the current buffer by running a command on it?
: .s@ ,@ @g
[jkramer/sgi5k:~]# list=(1,2,3,4,5,6,7,8,9,10) [jkramer/sgi5k:~]# !:gs/,/ / list=(1 2 3 4 5 6 7 8 9 10)
See zhexpn (1) for more information on ending / interleaving a story.
Only use custom zle widget, for example:
function _-sedsubs() { emulate -LR zsh zle -R "Substitution:" local SEDARG="s" local key="" read -k key local -r start=$key while (( (#key)!=(##\n) && (#key)!=(##\r) )) ; do if (( (#key)==(##^?) || (#key)==(##^h) )) ; then SEDARG=${SEDARG[1,-2]} else SEDARG="${SEDARG}$key" fi zle -R "Substitution: $SEDARG" read -k key || return 1 done BUFFER="$(echo $BUFFER | sed -r -e "$SEDARG")" } zle -N sedsubstitute _-sedsubs bindkey "\Co:s" sedsubstitute
Source: https://habr.com/ru/post/1307058/More articles:Writing to a new line in a file in Objective-C - objective-cCOM object to create open file dialog box in Vista? - javascriptMy problems with C # and DLL data - c #Themes or background processes in the Google App Engine (GAE) - pythonLost intellisense in VS2010 - visual-studio-2010https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1307059/what-are-the-most-frustrating-python-hacks-to-unwind-rewrite-etc&usg=ALkJrhj9vbCbwRak4PK5mw6QSwWL6dfPVgA simple cross-platform MPEG Video Stream player in Java through NetBeans + Swing? - javaSVN Delete using template? - svnhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1307062/why-does-rails-take-15-seconds-to-load-on-ruby-19&usg=ALkJrhgWamQ_AivwYuxr5mVUjw5_zAYN0wParent selector in jquery - jqueryAll Articles