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

Recent releases

  •  21 Feb 2014 02:15

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

    •  02 Dec 2013 03:03

      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.

      •  02 May 2013 14:28

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

        Recent comments

        25 Feb 2014 18:20 raycaster

        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

        OpenStack4j

        A Fluent OpenStack client API for Java.

        Screenshot

        Project Spotlight

        TurnKey TWiki Appliance

        A TWiki appliance that is easy to use and lightweight.