1 patch for repository http://code.haskell.org/XMonadContrib: Mon Feb 27 13:18:42 CET 2012 Steffen Schuldenzucker * Prompt.Directory: fix completion for paths containing whitespace New patches: [Prompt.Directory: fix completion for paths containing whitespace Steffen Schuldenzucker **20120227121842 Ignore-this: 5eeae1b0ae3c354b8dd7b33f184d0594 ] { hunk ./XMonad/Prompt/Directory.hs 26 import XMonad.Prompt import XMonad.Util.Run ( runProcessWithInput ) +import Data.Char (isSpace) + -- $usage -- For an example usage see "XMonad.Layout.WorkspaceDir" hunk ./XMonad/Prompt/Directory.hs 31 -data Dir = Dir String +data Dir = Dir SpaceEscdString instance XPrompt Dir where showXPrompt (Dir x) = x hunk ./XMonad/Prompt/Directory.hs 35 + completionToCommand _ = escapeSpaces directoryPrompt :: XPConfig -> String -> (String -> X ()) -> X () hunk ./XMonad/Prompt/Directory.hs 38 -directoryPrompt c prom = mkXPrompt (Dir prom) c getDirCompl +directoryPrompt c prom f = mkXPrompt (Dir prom) c getDirCompl (f . unescape) hunk ./XMonad/Prompt/Directory.hs 40 -getDirCompl :: String -> IO [String] +getDirCompl :: SpaceEscdString -> IO [String] getDirCompl s = (filter notboring . lines) `fmap` runProcessWithInput "/bin/bash" [] ("compgen -A directory " ++ s ++ "\n") hunk ./XMonad/Prompt/Directory.hs 48 notboring ('.':'.':_) = True notboring ('.':_) = False notboring _ = True + +-- We backslash-escape spaces because XMonad.Prompt generates a new completion +-- for the last /word/. Having a dir "hello world", we want +-- > hello\ world/ (list completions for "hello world/", not "world/") +type SpaceEscdString = String + +escapeSpaces :: String -> SpaceEscdString +escapeSpaces = concatMap $ \c -> if isSpecial c then '\\':[c] else [c] + where isSpecial c = isSpace c || c == '\\' + +unescape :: String -> SpaceEscdString +unescape [] = [] +unescape ('\\':c:cs) = c : unescape cs +unescape (c:cs) = c : unescape cs + } Context: [Adding use case for namedScratchpad. nicolas.dudebout@gatech.edu**20120122235843 Ignore-this: 44201e82bcd708cd7098f060345400f1 ] [Actions.WindowGo: typo fix - trim 's' per cub.uanic https://code.google.com/p/xmonad/issues/detail?id=491 gwern0@gmail.com**20120116224244 Ignore-this: fb1d55c1b4609069c55f13523c091260 ] [XMonad.Actions.PhysicalScreens: fix typo spotted by Chris Pick gwern0@gmail.com**20120115223013 Ignore-this: eb73b33b07dc58a36d3aa00bc8ac31c2 ] [roll back previous incorrect fix Daniel Wagner **20120111214133 Ignore-this: 91496faef411e6ae3442498b528d119b ] [Extending: fix http://code.google.com/p/xmonad/issues/detail?id=490 gwern0@gmail.com**20120111211907 Ignore-this: 515afbed507c070d60ab547e98682f12 ] [another documentation patch: XMonadContrib.UpdatePointer -> XMonad.Actions.UpdatePointer Daniel Wagner **20120111211226 Ignore-this: 1444e4a3f20ba442602ef1811d0b32c7 ] [documentation patch, fixes issue 490 Daniel Wagner **20120111210832 Ignore-this: 8d899e15f9d1a657e9fc687e2f649f45 ] [X.H.EwmhDesktops note that fullscreenEventHook is not included in ewmh Adam Vogt **20120102211404 Ignore-this: 92f15fa93877c165158c8fbd24aa2360 Just a documentation fix (nomeata's suggestion at issue 339). ] [X.H.EwmhDesktops haddock formatting. Adam Vogt **20120102211203 Ignore-this: cfff985e4034e06a0fe27c52c9971901 ] [X.A.Navigation2D Norbert Zeh **20111208205842 Ignore-this: 3860cc71bfc08d99bd8279c2e0945186 This is a new module to support directional navigation across multiple screens. As such it is related to X.A.WindowNavigation and X.L.WindowNavigation, but it is more general. For a detailed discussion of the differences, see http://www.cs.dal.ca/~nzeh/xmonad/Navigation2D.pdf. ] [documentation patch: mention PostfixOperators Daniel Wagner **20111210234820 Ignore-this: 20a05b1f396f18a742346d6e3daea9a8 ] [P.Shell documentation and add missing unsafePrompt export Adam Vogt **20111207163951 Ignore-this: a03992ffdc9c1a0f5bfa6dafc453b587 Haddock (version 2.9.2 at least) does not attach documentation to any of a b or c when given: -- | documentation a,b,c :: X ] [Paste: 3 more escaped characters from alistra gwern0@gmail.com**20111129160335 Ignore-this: 46f5b86a25bcd2b26d2e07ed33ffad68 ] [unfuck X.U.Paste Daniel Wagner **20111129032331 Ignore-this: d450e23ca026143bb6ca9d744dcdd906 ] [XMonad.Util.Paste: +alistra's patch for fixing his pasting of things like email address (@) gwern0@gmail.com**20111128215648 Ignore-this: 4af1af27637fe056792aa4f3bb0403eb ] [XMonad.Util.Paste: rm myself from maintainer field; I don't know how to fix any of it even if I wanted gwern0@gmail.com**20111128213001 Ignore-this: 87a4996aaa5241428ccb13851c5eb455 ] [XMonad.Prompt.Shell: improve 'env' documentation to cover goodgrue's problem gwern0@gmail.com**20111127231507 Ignore-this: 7b652a280960cbdf99c236496ca091b0 ] [Fix spelling 'prefered' -> 'preferred'. Erik de Castro Lopo **20111125010229 Ignore-this: f2eac1728b5e023399188becf867a14d ] [Restore TrackFloating behavior to an earlier version. Adam Vogt **20111120045538 Ignore-this: 1a1367b4171c3ad23b0553766021629f Thanks for liskni_si for pressing the matter: without this change it is very broken, with the patch it is still not perfect but still useful. ] [Explicitly list test files in .cabal Adam Vogt **20111118232511 Ignore-this: ac48a0d388293cc6c771d676aaf142e3 In the future, require Cabal >= 1.6 to be able to just write tests/*.hs ] [TAG 0.10 Adam Vogt **20111118225640 Ignore-this: 8f81b175b902e985d584160fc41ab7d1 ] Patch bundle hash: 9bea24dbd7b38ecf95cbb4b7d565d6aafba71572