简体   繁体   English

设置bash Osx的提示?

[英]set prompts for bash Osx?

i am trying to set up a prompt in terminal as a safety net to ask me yes or no when I want to 我想在终端设置一个提示作为安全网,在我想要的时候问我是或否
-cp , -rm , -mv etc. I created a ~/.bashrc file but my syntax inside the folder is wrong i believe because i do not get a prompt when i execute one of the following commands. -cp-rm-mv等我创建了一个~/.bashrc文件,但我在文件夹中的语法是错误的我相信,因为我执行以下命令之一时没有得到提示。 Can anyone tell me the proper syntax for doing this in bash? 谁能告诉我在bash中这样做的正确语法? Here is what i have in my ~/.bashrc now 这是我现在在~/.bashrc

alias rm ‘rm -i’
alias mv ‘mv -i’
alias cp ‘cp -i’

This works on .tcshrc but apparently not in bash, any help is appreciated. 这适用于.tcshrc,但显然不是在bash中,任何帮助都表示赞赏。

The syntax in bash is alias name=value . bash中的语法是alias name=value

For example: 例如:

alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

Check the man page for more information. 有关更多信息,请查看man页。

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

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