diff --git a/basis/editors/gvim/gvim.factor b/basis/editors/gvim/gvim.factor index 8fb4d6b23d..15fd52f5ee 100644 --- a/basis/editors/gvim/gvim.factor +++ b/basis/editors/gvim/gvim.factor @@ -3,6 +3,9 @@ namespaces sequences system combinators editors.vim vocabs.loader make ; IN: editors.gvim +! This code builds on the code in editors.vim; see there for +! more information. + SINGLETON: gvim HOOK: gvim-path io-backend ( -- path ) diff --git a/basis/editors/vim/generate-syntax/generate-syntax.factor b/basis/editors/vim/generate-syntax/generate-syntax.factor index 74b04c346f..061e938dcf 100644 --- a/basis/editors/vim/generate-syntax/generate-syntax.factor +++ b/basis/editors/vim/generate-syntax/generate-syntax.factor @@ -4,7 +4,7 @@ IN: editors.vim.generate-syntax : generate-vim-syntax ( -- ) "misc/factor.vim.fgen" resource-path - "misc/factor.vim" resource-path + "misc/vim/syntax/factor.vim" resource-path template-convert ; MAIN: generate-vim-syntax diff --git a/basis/editors/vim/vim-docs.factor b/basis/editors/vim/vim-docs.factor index 3387dc5971..7f527bf18f 100644 --- a/basis/editors/vim/vim-docs.factor +++ b/basis/editors/vim/vim-docs.factor @@ -12,5 +12,6 @@ $nl "USE: vim" "\"c:\\\\program files\\\\vim\\\\vim70\\\\gvim\" vim-path set-global" } -"On Unix, you may omit the last line if " { $snippet "\"vim\"" } " is in your " { $snippet "$PATH" } "." ; - +"On Unix, you may omit the last line if " { $snippet "\"vim\"" } " is in your " { $snippet "$PATH" } "." +$nl +"You may also wish to install Vim support files to enable syntax hilighting and other features. These are in the " { $link resource-path } " in " { $snippet "misc/vim" } "." ; diff --git a/basis/io/streams/duplex/duplex-docs.factor b/basis/io/streams/duplex/duplex-docs.factor index 48afafeec7..5bf33e9002 100644 --- a/basis/io/streams/duplex/duplex-docs.factor +++ b/basis/io/streams/duplex/duplex-docs.factor @@ -20,11 +20,11 @@ HELP: HELP: with-stream { $values { "stream" duplex-stream } { "quot" quotation } } -{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } ". The stream is closed if the quotation returns or throws an error." } ; +{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } ", which must be a duplex stream. The stream is closed if the quotation returns or throws an error." } ; HELP: with-stream* { $values { "stream" duplex-stream } { "quot" quotation } } -{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } "." } +{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } ", which must be a duplex stream." } { $notes "This word does not close the stream. Compare with " { $link with-stream } "." } ; HELP: diff --git a/extra/git-tool/remote/remote.factor b/extra/git-tool/remote/remote.factor new file mode 100644 index 0000000000..e5291a8459 --- /dev/null +++ b/extra/git-tool/remote/remote.factor @@ -0,0 +1,392 @@ + +USING: accessors calendar git-tool git-tool io.directories +io.monitors io.pathnames kernel locals math namespaces +sequences splitting system threads ui ui.gadgets +ui.gadgets.buttons ui.gadgets.labels ui.gadgets.packs ; + +USING: git-tool ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +IN: git-tool.remote + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +TUPLE: < pack + repository + branch + remote + remote-branch + fetch-period + push + closed + last-refresh ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: current-branch ( REPO -- branch ) + { "git" "branch" } git-process stdout>> [ "* " head? ] find nip 2 tail ; + +: list-branches ( REPO -- branches ) + { "git" "branch" } git-process stdout>> + [ empty? not ] filter + [ 2 tail ] map ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: list-remotes ( REPO -- remotes ) + { "git" "remote" } git-process stdout>> [ empty? not ] filter ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +:: list-remote-branches ( REPO REMOTE -- branches ) + [let | OUT [ REPO { "git" "remote" "show" REMOTE } git-process stdout>> ] | + + " Tracked remote branches" OUT member? + [ + OUT + " Tracked remote branches" OUT index 1 + tail first " " split + [ empty? not ] filter + ] + [ + OUT + OUT [ " New remote branches" head? ] find drop + 1 + tail first " " split + [ empty? not ] filter + ] + if ] ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +:: refresh-git-remote-gadget ( GADGET -- ) + + [let | REPO [ GADGET repository>> ] | + + GADGET clear-gadget + + GADGET + + ! Repository label + + "Repository: " REPO [ current-directory get ] with-directory append +