Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2546  / 1 Year ago, thu, february 2, 2023, 8:24:31

I just installed sublime text 2 on Ubuntu 12.10 and would like to be able to run it as its own environment variable. Example $ sublime somefile.js how do I add custom variables?


More From » bash

 Answers
3

I am not sure this is the most elegant solution but you can create a script in your ~/bin/sublime with the following commands:



cd
echo "/FULL-PATH-TO-YOUR-SUBLIME-FOLDER/sublime_text $1" > ~/bin/sublime
chmod +x ~/bin/sublime


and then if your ~/bin/ folder is in your $PATH then you will be able to run $ sublime somefile.js



To check your $PATH just run echo $PATH



If you bin is not ther edit your .bashrc file and edit or add a line like the following:



PATH=$PATH:$HOME/bin
export PATH

[#31844] Thursday, February 2, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
looweets

Total Points: 52
Total Questions: 114
Total Answers: 111

Location: Turkmenistan
Member since Sat, Apr 16, 2022
2 Years ago
looweets questions
Fri, Apr 29, 22, 09:47, 2 Years ago
Thu, Nov 3, 22, 03:32, 2 Years ago
Sun, Mar 5, 23, 00:43, 1 Year ago
;