XMonad.Prompt.Zsh

xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (C) 2020 Zubin Duggal
License | BSD3
Maintainer | zubin.duggal@gmail.com
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Prompt.Zsh

Contents

- Usage
- Utility functions

Description

A version of XMonad.Prompt.Shell that lets you access the awesome power of Zsh completions in your xmonad prompt

Synopsis

- data Zsh = Zsh
- zshPrompt :: XPConfig -> FilePath -> X ()
- getZshCompl :: FilePath -> String -> IO [String]
- stripZsh :: String -> String

# Usage

1. Grab the `capture.zsh` script to capture zsh completions from https://github.com/Valodim/zsh-capture-completion
2. In your `xmonad.hs`:

    import XMonad.Prompt
    import XMonad.Prompt.Zsh

1. In your keybindings add something like:

      , ((modm .|. controlMask, xK_x), zshPrompt def "/path/to/capture.zsh")

For detailed instruction on editing the key binding see the tutorial.

data Zsh #

Constructors

Zsh |

#### Instances

Instances details

XPrompt Zsh # |
Instance details Defined in XMonad.Prompt.Zsh Methods showXPrompt :: Zsh -> String # nextCompletion :: Zsh -> String -> [String] -> String # commandToComplete :: Zsh -> String -> String # completionToCommand :: Zsh -> String -> String # completionFunction :: Zsh -> ComplFunction # modeAction :: Zsh -> String -> String -> X () #

zshPrompt :: XPConfig -> FilePath -> X () #

# Utility functions

getZshCompl :: FilePath -> String -> IO [String] #

stripZsh :: String -> String #

Removes the argument description from the zsh completion