[darcs-users] Can't download darcs 2.0.1rc2
Trent W. Buck
trentbuck at gmail.com
Tue Jul 8 03:10:41 UTC 2008
"Salvatore Insalaco" <kirby81 at gmail.com> writes:
> There're a couple of workarounds, the easiest is to copy more.com (in
> windows\system32 if I recall correctly) to less.exe (in the same
> directory).
I suggest patching src/Darcs/Utils.lhs to implement "view_file" on top
of get_viewer, similar to how get_editor and edit_file behave. It's
extremely sensible to try running more, then cat, if less can't be
executed -- even on Unix.
| edit_file :: String -> IO ExitCode
| edit_file f = do
| ed <- get_editor
| exec_interactive ed f
| `ortryrunning` exec_interactive "emacs" f
| `ortryrunning` exec_interactive "emacs -nw" f
| `ortryrunning` exec_interactive "nano" f
| #ifdef WIN32
| `ortryrunning` exec_interactive "edit" f
| #endif
| get_editor :: IO String
| get_editor = getEnv "DARCS_EDITOR" `catchall`
| getEnv "DARCSEDITOR" `catchall`
| getEnv "VISUAL" `catchall`
| getEnv "EDITOR" `catchall` return "vi"
|
| get_viewer :: IO String
| get_viewer = getEnv "DARCS_PAGER" `catchall`
| getEnv "PAGER" `catchall` return "less"
More information about the darcs-users
mailing list