[fossil-users] Automatic editor detection.

2015-05-12 Thread John Found
Maybe this trick will be useful for someone. Using the same repository from several Linux distributions, I set the editor following way: editor=$(xdg-mime query default text/plain | sed 's/\..*//') $editor This way, on every distro, the default editor is detected and used. For me it

Re: [fossil-users] Automatic editor detection.

2015-05-12 Thread Stephan Beal
On Tue, May 12, 2015 at 8:35 PM, John Found johnfo...@asm32.info wrote: Maybe this trick will be useful for someone. Using the same repository from several Linux distributions, I set the editor following way: editor=$(xdg-mime query default text/plain | sed 's/\..*//') $editor fyi:

Re: [fossil-users] Automatic editor detection.

2015-05-12 Thread Stephan Beal
On Tue, May 12, 2015 at 10:33 PM, John Found johnfo...@asm32.info wrote: On Tue, 12 May 2015 20:43:45 +0200 Stephan Beal sgb...@googlemail.com wrote: editor=$(xdg-mime query default text/plain | sed 's/\..*//') $editor No, it does not works on the first use in the console. At the second

Re: [fossil-users] Automatic editor detection.

2015-05-12 Thread John Found
On Tue, 12 May 2015 20:43:45 +0200 Stephan Beal sgb...@googlemail.com wrote: editor=$(xdg-mime query default text/plain | sed 's/\..*//') $editor No, it does not works on the first use in the console. At the second time, only $editor is enough. Some distributions have $editor environment

Re: [fossil-users] Automatic editor detection.

2015-05-12 Thread John Found
On Tue, 12 May 2015 20:43:45 +0200 Stephan Beal sgb...@googlemail.com wrote: editor=$(xdg-mime query default text/plain | sed 's/\..*//') $editor No, it does not works on the first use in the console. At the second time, only $editor is enough. Some distributions have $editor environment

Re: [fossil-users] Automatic editor detection.

2015-05-12 Thread Andy Bradford
Thus said John Found on Tue, 12 May 2015 23:33:00 +0300: BTW, I found shorter form, without defining variable: I usually just use: EDITOR=vi; export EDITOR :-) Andy -- TAI64 timestamp: 400055526e2a ___ fossil-users mailing list