简体   繁体   English

Catch-22 UNIX Shell Zsh

[英]Catch-22 UNIX Shell Zsh

I was fooling around with .zshrc files, and now I am locked out of my terminal with "No such shell function 'accept-line'". 我当时在闲逛.zshrc文件,现在我被“没有这样的shell函数'accept-line'”锁定在终端之外。

It would be easy to just go and undo the change in the .zshrc file, but my terminal autoloads into zsh, so there is no way to edit the dotfile. 只需撤消.zshrc文件中的更改将很容易,但是我的终端会自动加载到zsh中,因此无法编辑点文件。

I have looked all around for a way to edit hidden files in El Capitan, but to no avail. 我到处寻找一种在El Capitan中编辑隐藏文件的方法,但无济于事。

From your mention of 'El Capitan' I infer that you might be on OS X and using Terminal.app? 从您提到的“ El Capitan”中,我推断您可能在OS X上并使用Terminal.app? If so, please add a tag for that, or state that clearly. 如果是这样,请为此添加标签,或明确说明。

If so, you could duplicate a Terminal profile in the preferences and under Settings->Shell / Startup set eg /bin/bash as the command and untick "run inside shell". 如果是这样,您可以在首选项中的“设置”->“外壳程序/启动”集(例如/bin/bash下复制“终端”配置文件作为命令,然后取消选中“在外壳内运行”。 That should give you a bash which will ignore .zshrc . 那应该给你一个bash,它将忽略.zshrc

Otherwise, look for similar settings in your terminal emulator. 否则,请在终端仿真器中查找类似的设置。 Most should have such a setting somewhere. 大多数应该在某处具有这样的设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM