Skip to content
Snippets Groups Projects
Select Git revision
  • 7dcdb5f19dea049e0b570f2702718b0fdfb18fdb
  • master default
  • autorisation_visit
  • signup_mydata
  • format_editData
  • dev
  • authorize-valid-profile
  • feli90-patch-2
  • feli90-patch-1
  • context_sheet
  • testNewForm
  • FeliLocalTest1
  • ios-account-fix
  • change-form-link
  • dev_pages_projet
  • remise_sorties
  • release/first-users
17 results

README.md

Blame
  • watch.plugin.zsh 810 B
    # ------------------------------------------------------------------------------
    # Description
    # -----------
    #
    # watch will be inserted before the command
    #
    # ------------------------------------------------------------------------------
    # Authors
    # -------
    #
    # * Connard <baptiste.gc@student-cs.fr>
    #
    # ------------------------------------------------------------------------------
    
    watch-command-line() {
        [[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)"
        if [[ $BUFFER == watch\ * ]]; then
            if [[ ${#LBUFFER} -le 4 ]]; then
                RBUFFER="${BUFFER#watch }"
                LBUFFER=""
            else
                LBUFFER="${LBUFFER#watch }"
            fi
        else
            LBUFFER="watch $LBUFFER"
        fi
    }
    
    zle -N watch-command-line
    
    # Defined shortcut keys: [Alt] [Esc]
    bindkey '^\e' watch-command-line