Projects / vcprompt

vcprompt

vcprompt prints a short string, to be included in your shell prompt, with barebones information about the current working directory for various version control systems. It is designed to be small and lightweight rather than comprehensive. It has varying degrees of recognition for Mercurial, Git, Subversion, CVS, and Fossil working copies.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  21 Feb 2014 03:55

    Release Notes: Portability fix: doesn't depend on such a recent version of SQLite3.

    •  02 Dec 2013 03:16

      Release Notes: Subversion: support for versions 1.7 and 1.8. Adds a configure script. Subversion: fixes "%r" so it reports the "Last Changed Rev" of the current working copy, not the last revision in the whole repository. Subversion: implements "%b" to show branch.

      •  03 May 2013 02:15

        Release Notes: This release adds support for reporting modified/unknown files in Mercurial working dirs (%m and %u format specifiers).

        RSS Recent comments

        25 Feb 2014 18:20 raycaster Thumbs up

        Extremely useful for command line developers. I'm using the following in my ~/.bashrc file to add the vcprompt info only when I'm in a vc directory.

        export PS1_BASE=$PS1

        function __ps1_vcprompt {
        VCPROMPT=$(vcprompt -f '[%n:%b%m%u]')
        if [[ ! -z "${VCPROMPT}" ]]; then
        export PS1="\n${PS1_BASE%\\\$*}\n${VCPROMPT}\$ "
        else
        export PS1="\n${PS1_BASE}"
        fi
        }

        PROMPT_COMMAND='__ps1_vcprompt'

        The resulting PS1 will be either "\n[%u@%h %w]\$ " or "\n[%u@%h %w]\n[%n:%b%m%u]\$ " depending on if I'm in a version controlled directory. Nice being able to see if I have uncommitted or untracked files from the prompt!

        Screenshot

        Project Spotlight

        reposurgeon

        A tool for editing version control repository history.

        Screenshot

        Project Spotlight

        Profanity

        A ncurses-based Jabber client.