Tuesday, May 14, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2453  / 2 Years ago, fri, june 10, 2022, 6:53:48

I want to open sublime text editor in my ubuntu18.04LTS command prompt to access my work.


More From » command-line

 Answers
6

Simply use subl <filename>?!



To call Sublime Text from a terminal (assuming you are running in an X environment), you can use the subl command, which is a small shell script that executes the following under the hood.



exec /opt/sublime_text/sublime_text --fwdargv0 "$0" "$@"





For the sake of completeness. The goal turned out to be using sublime as the name on the command line. So I suggested using an alias in the shell.



Not all shells may have that facility, but since this is about Ubuntu, chances were that the OP wanted a solution that worked in Bash.



So



alias sublime=subl


would make it available under the desired name. Alternatively alias sublime=$(which subl).


[#3506] Sunday, June 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calcur

Total Points: 189
Total Questions: 80
Total Answers: 95

Location: Burkina Faso
Member since Thu, Dec 15, 2022
1 Year ago
;