快捷键来代替previous bash命令所有字符串 [英] shortcut to replace all strings in previous bash command
问题描述
男人庆典
描述了一个非常有用的事件标志
man bash
describes a very useful Event Designator
^ ^字符串1 ^字符串2
^string1^string2^
快速替换。重复上一个命令,以string2替换字符串1。相当于'!!:S /字符串1 /字符串2 /''
Quick substitution. Repeat the last command, replacing string1 with string2. Equivalent to ''!!:s/string1/string2/''
有执行 !!道:GS /字符串1 /字符串2 /
在打字的时候 @字符串1 @字符串2 @
在命令行上,以取代在previous命令所有出现? ( @
或任何其他指定的字符/串)
Is there a way to execute !!:gs/string1/string2/
when typing in @string1@string2@
on the command line to replace all occurrences in the previous command? (@
or any other designated character/string)
推荐答案
^ ^字符串1 ^字符串2:G&安培;
请参阅问题在最后的命令替换单词的所有事件。
See question Replace all occurrences of a word in the last command.
请参阅修饰符在<一个href=\"https://www.gnu.org/software/bash/manual/html_node/History-Interaction.html#History-Interaction\"相对=nofollow>历史扩展。
这篇关于快捷键来代替previous bash命令所有字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!