Reputation: 461
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.
Upvotes: 2
Views: 14607
Reputation: 7260
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.
Upvotes: 3
Reputation: 6176
You can use open
:
open [PATH_TO_FILE] -a [PATH_TO_GEANY_APP]
The a
option defines which application to use.
Something like echo 'alias geany="open $1 -a [PATH_TO_GEANY_APP]"' >> ~/.bash_profile && chmod u+x ~/.bash_profile
. Then open a new Terminal window and type geany [path_to_file]
.
Upvotes: 0