Hellor大家,我想在我的.zshrc文件中添加一个别名,但请看一下我真的不明白
[23:29:36] charvet:~ $ expressvpn
NAME:
expressvpn - ExpressVPN command line interface
USAGE:
expressvpn command [arguments...]
VERSION:
1.1.0 (e822d60)
COMMANDS:
activate Activate account
connect Connect to VPN
disconnect Disconnect from VPN
status Display service information
list, ls List VPN locations
autoconnect Enable / disable auto-connect
protocol Display / change preferred protocol
refresh Refresh VPN clusters
reset Reset VPN account
diagnostics Display connection diagnostics
preferences List user preferences
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
然后我在我的文件中写道.zshrc
alias expressvpn=vpn
然后在zsh:
[23:29:46] charvet:~ $ source .zshrc
ls='ls --color=tty'
[23:29:52] charvet:~ $ vpn
zsh: command not found: vpn
[23:29:55] charvet:~ $
我完全迷失了,我不明白。人们谈论“=”周围的白色空间,但我没有。
答案 0 :(得分:2)
试试alias vpn=expressvpn
?
请尝试使用help alias
获取别名语法的帮助。
答案 1 :(得分:0)
您必须在个人资料中说
alias expressvpn= 'vpn'
就是这样