.bash-profile

Setting environment variables for Sublime Text on OSX desktop

最后都变了- 提交于 2019-12-10 13:14:43
问题 I'd like to be able to access my JAVA_HOME variable that has been set in my .bash_profile from within my sublime text build. When I build I get the following error. Error: JAVA_HOME is not defined correctly. We cannot execute .... This is obviously because ST2 doesn't read in my bash profile. Is there any hack around for this? Thanks! 回答1: On UNIX child processes inherit the environment of the parent process. In this case, Sublime Text is not launched through a process chain which would

Batch Build and Archive of iOS apps via Terminal

我与影子孤独终老i 提交于 2019-12-09 04:46:33
问题 I am trying to simplify the build->archive->submit process for iOS app publishing. We have over 50 mobile apps that have nearly identical framework, but with different artwork and configuration settings. I normally would load each project in xcode 4.2 and build->archive->submit the usual way with the xcode GUI, but we are up over 50 apps now and this process is very tiresome any time we push out an update. That being said, I am trying to speed up this process with using a shell function. I

Bash .profile not loading

一曲冷凌霜 提交于 2019-12-09 00:30:42
问题 I'm not sure what's happened but my ~/.profile is no longer loading. Can anyone see something wrong with the following? export PS1="\u@local [\w]# " export EDITOR="subl -w" export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced alias vst="ssh -i ~/.ssh/vst root@vst" I know for a fact using that PS1 like I am attempting to do it should be doing Peter@local [~/path/to/file]# but it's not. Any ideas? 回答1: Does ~/.bash_profile or ~/.bash_login exist? If so, that'll be used instead of ~/.profile

how to modify conda 'source activate' ps1 behavior

与世无争的帅哥 提交于 2019-12-08 19:21:14
问题 my current bash ps1 is as follows: bldred='\e[1;31m' # Red bldcyn='\e[1;36m' # Cyan bldwht='\e[1;37m' # White txtrst='\e[0m' # Text Reset - Useful for avoiding color bleed export PS1="\n\[$bldred\]\u\[$txtrst\]@\[$bldwht\]\h\[$txtrst\]:\[$bldcyn\]\w\[$txtrst\]$ " However, running: source activate <env-name-here> by default, tells conda to prepend the env-name to my PS1 : (<env-name-here>) user@short-domain:fullpath$ Is there a way to tell conda to insert the env-name within my PS1 instead,

Is there a way to “resource” by bash_profile without restarting terminal? [duplicate]

耗尽温柔 提交于 2019-12-08 16:23:15
问题 This question already has answers here : How to reload .bash_profile from the command line? (14 answers) Closed 3 years ago . I often times have to make changes to my ~/.bash_profile , and I have to restart terminal for the changes to propagate. Is there any command I can run to re-source my ~/.bash_profile ? 回答1: Yes, you can just run: source ~/.bash_profile Or: . ~/.bash_profile This will reload/re-source the .bash_profile in the current shell. I put this command in my ~/.bash_profile for

Postgres.app setup: getting `which psql` to return desired path

拟墨画扇 提交于 2019-12-08 05:31:52
问题 I just installed Postgres.app, and now which psql returns nothing . I followed the instructions listed on the Postgres site; here's what I did: 1) Dragged my old version of Postgres to the trash. Emptied trash. 2) Downloaded the current version of Postgres.app. Dragged it to Applications folder. 3) Restarted Terminal. The output I'm looking for from which psql is something like: /Applications/Postgres.app/Contents/Versions/9.3/bin/psql When I run brew install postgresql followed by which psql

A bash function that runs script

筅森魡賤 提交于 2019-12-08 02:43:42
问题 I'm trying to write a bash function named myrun , such that doing myrun script.py with a Python file: #MYRUN:nohup python -u script.py & import time print 'Hello world' time.sleep(2) print 'Once again' will run the script with the command specified in the first line of the file, just after #MYRUN: . What should I insert in .bashrc to allow this? Here is what I have now: myrun () { [[ "$1" = "" ]] && echo "usage: myrun python_script.py" && return 0 <something with awk here or something else?>

To use bash --login by default with capistrano 3 + sshkit + rvm

给你一囗甜甜゛ 提交于 2019-12-08 02:18:20
问题 I have following cap3 task task :gemset do on roles(:all) do if remote_dir_exists?(".rvm") execute :rvm, :gemset, :use, "#{ Configs.rvm.ruby }@#{ Configs.rvm.gemset } --create" else info "RVM not installed" end end end for settings rvm: ruby: ruby-2.0.0-p247 gemset: cap3 it should execute on my server following command rvm gemset use ruby-2.0.0-p247@cap3 --create but it gives to me DEBUG [9bd5fc11] RVM is not a function, selecting rubies with 'rvm use ...' will not work. DEBUG [9bd5fc11]

Creating a 'git log' alias with formatting

两盒软妹~` 提交于 2019-12-08 01:32:44
问题 I have a bunch of git aliases already set up in my .bash_profile that work correctly: alias gst="git status" alias gl="git pull" alias gp="git push" alias gd="git diff | mate" alias gc="git commit -v" alias gca="git commit -v -a" alias gb="git branch" alias gba="git branch -a" I'm trying to add an alias for the following command, but keep running into an error: git log --all --pretty=format:'%h %cd %s (%an)' --since='7 days ago' What I'd like to do, is be able to type: glog 'some amount of

command not found message when I try to add command in .bashrc

假如想象 提交于 2019-12-07 01:50:28
问题 I asked a question at how to write a beautifully elegant linux command in bash shell And when I tried the suggestion, I got the following error message. Sorry, command-not-found has crashed! Please file a bug report at: https://bugs.launchpad.net/command-not-found/+filebug Please include the following information with the report: command-not-found version: 0.3 Python version: 3.2.3 final 0 Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal Exception information: