Can I open a file with geany from the terminal

Eric MacLeod picture Eric MacLeod · Jan 4, 2016 · Viewed 10k times · Source

I know there is a shortcut to open a file with sublime text from the terminal but id there something similar with geany, the only info I can find online about it is opening a file from geany to the terminal.

Answer

frlan picture frlan · Jan 4, 2016

If Geany is inside your path, just call geany <file>. This should work on every platform, Geany is running.

Out of Geany's man page:

SYNOPSIS
       geany [option]  [+number]  [files ...]

This will open files either in a new session or, if already a session of Geany is running, inside the existing one.

A file can be given as space separated list and might take even line numbers:

files ...
 A space-separated list of filenames.  Absolute  and  relative
 filenames  can be used. Geany also recognises line and column
 information when appended to the filename with  colons,  e.g.
 "geany foo.bar:10:5" will open the file foo.bar and place the
 cursor in line 10 at column 5.