sublimetext2 - Setting up Sublime to use bash aliases & functions -
i'm using sublime , set custom build scheme can see , utilize aliases , bash functions i've setup in ~/.bashrc, works terminal.
in .bashrc file have build function:
function build() { // various bash commands }
in ~/library/application support/sublime text 3/packages/user directory have project.sublime-build file:
{ "cmd": ["build"], "working_dir": "~/mozilla/git-master", "shell" : "true" }
which doesn't work. how can sublime see , utilize build function defined in .bashrc file?
sublime can not read .bashrc
, in order utilize custom functions you'll have create build
file:
#!/bin/bash #contents of build() go here...
save file in ~/bin
, set executable. then, modify project.sublime-build
file so:
{ "cmd": ["build"], "path": "~/bin:$path", "working_dir": "~/mozilla/git-master", "shell" : "true" }
and should set.
bash sublimetext2 sublimetext3
No comments:
Post a Comment