英文:
Why i am getting error zsh event not found on sed command
问题
以下是已翻译的内容:
sed "s/map(\x27t\x27, \x27<Esc>\x27, \x27<C-\\\\><C-n>\x27)/map(\x27t\x27, \x27<Esc>\x27, \x27<C-\\\\><C-n>:q!<cr>\x27)/g" ~/.config/nvim/lua/core/keymaps.lua
zsh: 事件未找到: <cr>\x27)/g
你能指导我吗?我犯了什么错误?
我想将这个
map('t', '<Esc>', '<C-\\><C-n>')
更改为
map('t', '<Esc>', '<C-\\><C-n>':q!<cr>)
使用 Sed
谢谢
英文:
sed "s/map(\x27t\x27, \x27<Esc>\x27, \x27<C-\\\\><C-n>\x27)/map(\x27t\x27, \x27<Esc>\x27, \x27<C-\\\\><C-n>:q!<cr>\x27)/g" ~/.config/nvim/lua/core/keymaps.lua
zsh: event not found: <cr>\x27)/g
Can you please guide me. What’s the mistake, I am making?
I want to change this
map('t', '<Esc>', '<C-\\><C-n>')
Into
map('t', '<Esc>', '<C-\\><C-n>':q!<cr>)
Using Sed
Thanks
答案1
得分: 1
!
在 ZSH shell 中是历史扩展。请查看 https://zsh.sourceforge.io/Doc/Release/Expansion.html 。你出现错误是因为你从未有一个以 \x27/g
开头的命令。
英文:
!
is a history expansion in ZSH shell. See https://zsh.sourceforge.io/Doc/Release/Expansion.html . You are getting the error, because you never had a command that started with \x27/g
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论