Start atom on dir from console or window to choose dir[SOLVED]


#1

Hi. Is possible to add one more parameter to Atom? It would be great open Atom in directory from console like atom --dir ~/project or when path is empty, open a window to choose some directory. Now we have to start Atom, open another directory and next close old window.


#2

I don’t understand. I regularly run atom . or atom ~/foo and Atom launches with that directory as the current project. Is there something different you would like to happen?


#3

No. Now I can write this script :smile:

#!/bin/bash

DIR=`zenity --file-selection --directory --title="Select a directory"`
echo $DIR
if ! [ -z $DIR ]
then
    atom $DIR
fi

and all is fine.

Thank you very much.