edit
The xeno edit
subcommand begins editing sessions with xeno. Sessions persist indefinitely until stopped with the xeno stop
subcommand. They can be resumed (e.g. if you close your editor) with the xeno resume
subcommand.
To start editing a remote path over SSH, use
xeno edit user@hostname:/the/path
xeno will clone the remote path locally and keep it in sync with the remote copy. Or, if you are already in an SSH session1, you can do
xeno edit /the/path
and it will have exactly the same effect!
1: For in-session launches, you must use `xeno ssh`, a VERY thin wrapper around SSH which monitors console output for initialization messages, and must install xeno on the remote end.To keep consistency, if you use the xeno edit
command on a local path outside of an SSH session, it will simply open the local path in your editor, so you don't have to use a different command to launch your local editor. Thus, it is often convenient to alias the xeno edit
command as something like xen
, and use the xen
command as a way to consistently launch your editor, both locally and remotely.
xeno edit
also supports passing gitignore(5)
values via the -i|--ignore
flag, which xeno will apply when generating a repository of the remote end. This can be useful if you want to exclude a particular directory on the remote end. The values passed to the -i|--ignore
flag are entered directory into xeno's $GIT_DIR/info/exclude
list, so all normal gitignore(5)
flags are supported.
xeno will also respect any settings in any .gitignore
files that you have in the path being edited, and these will take precedence over $GIT_DIR/info/exclude
. This has the unfortunate side-effect of making !
flags rather useless for overriding .gitignore
entries at the moment, but there is not much that can be done about this since the git add
command does not allow command line ignore flags.