【发布时间】:2019-11-19 11:01:35
【问题描述】:
每当我打开终端时,~/.bash_profile# 文件都会在 VIM 中打开。
当我单击 2+ctrl+g 时,我得到以下文件详细信息
buf 1: "~/.bash_profile#" line 1 of 6 --16%-- col 1 (1 of 8)
Roys-Air:桌面用户名$ ls -altr $HOME |尾巴
-rw------- 1 个用户名员工 12288 Jul 10 01:26 .swo
-rw-r--r-- 1 个用户名 staff 12288 Jul 10 01:27 .bash_profile#.swp
-rw-r--r-- 1 用户名员工 0 Jul 10 01:29 .bashrc
drwxr-xr-x 4 用户名员工 128 Jul 10 01:38 私人
-rw-r--r--@ 1 个用户名 staff 14340 Jul 10 01:38 .DS_Store
-rw------- 1 个用户名员工 9986 Jul 10 01:40 .bash_history
-rw-r--r-- 1 个用户名 staff 5 Jul 10 01:40 .bash_profile#
-rw------- 1 个用户名 staff 8402 Jul 10 01:40 .viminfo
drwxr-xr-x+ 52 用户名员工 1664 Jul 10 01:40 .
drwx------ 81 用户名员工 2592 Jul 10 01:40 .bash_sessions
我希望终端应该像 Roys-Air 一样打开:~ UserName$
.bash_profile 包含以下内容
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export MONGO_PATH=/usr/local/mongodb
export PATH=$PATH:$MONGO_PATH/bin
##
# Your previous /Users/rajnikantroy/.bash_profile file was backed up as /Users/rajnikantroy/.bash_profile.macports-saved_2018-12-07_at_02:06:08
##
# MacPorts Installer addition on 2018-12-07_at_02:06:08: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
# Setting PATH for Python 3.7
vim .bash_profile# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export ANT_HOME=/Users/rajnikantroy/Documents/ant/apache-ant-1.10.6/
export PATH=$PATH:$ANT_HOME/bin
【问题讨论】:
-
.bash_profile 中有什么内容?
-
嗨@GordonDavisson,我在帖子中添加了 .bash_profile 内容。
标签: macos vim terminal default macos-high-sierra