Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SublimeText auto-open project in current directory if it exists and argument is . or blank.
- function project_aware_subl {
- project_file=$(ls *.sublime-project 2>/dev/null | head -n 1)
- if [[ ( ! -z "$project_file" ) && ( "${*}" == "." || -z "${*}") ]]
- then
- command subl "$project_file"
- else
- command subl ${*}
- fi
- }
- alias subl="project_aware_subl"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement