Menu

Tree [e7f469] master /
 History

HTTPS access


File Date Author Commit
 tests 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 .gitignore 2011-11-16 Horea Haitonic Horea Haitonic [7256aa] Added PyCharm's .idea cache directory to the ig...
 CommandHistory.py 2015-06-02 Horea Haitonic Horea Haitonic [e43443] Visual bells for text and history search
 DirHistory.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 InputState.py 2017-09-29 Horea Haitonic Horea Haitonic [bd6300] Typing replaces selection
 LICENSE.txt 2009-08-07 Horea Haitonic Horea Haitonic [743881] Added files from the SVN repository (SVN rev: 6...
 Makefile 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 NEWS.txt 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 PyCmd.ico 2009-08-07 Horea Haitonic Horea Haitonic [743881] Added files from the SVN repository (SVN rev: 6...
 PyCmd.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 README.txt 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 Window.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 common.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 completion.py 2020-12-24 Horea Haitonic Horea Haitonic [52ca0c] Reworked completion display mechanism
 console.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 example-init.py 2022-10-26 Horea Haitonic Horea Haitonic [557a3c] Keep the last ERRORLEVEL in the environment
 fsm.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 pycmd_public.py 2022-12-02 Horea Haitonic Horea Haitonic [e7f469] Port to Python3
 run_tests.py 2022-10-26 Horea Haitonic Horea Haitonic [8030ac] Added tests for the run_command() function
 setup.py 2017-10-09 Horea Haitonic Horea Haitonic [4310dd] Build fixes

Read Me

1. What is PyCmd?  
-----------------
PyCmd is a 'smart' command prompt extension for Windows' cmd.exe; its purpose is
to emulate a few power features of UNIX shells (decent Tab-completion,
persistent history, etc.)


2. What are some important features?
------------------------------------
 a. Tab completion 
    - when several completions are possible, list them (plain/bash- or
      interactive/zsh-style)
    - insert/remove quotes as needed
    - complete executables from the PATH and internal CMD.exe commands
    - complete names of environment variables, including pseudo-variables
    - complete wildcards
    - expand values of environment variables when completing
    - support both '/' and '\' as path separators

 b. Command history
    - the history is persistent across PyCmd sessions
    - one can search through the history (type a few filter characters/words,
      then Up/Down)
    - reordering is more intuitive than cmd's default strategy

 c. Command editing
    - support emacs key bindings
    - Copy-Paste using the keyboard (Ctrl-C/X/V or Emacs-style)
    - Undo/Redo with Ctrl-[Shift-]Z (regular style) or Ctrl-_ (Emacs-style)
    - dynamic, context-sensitive token expansion with Alt-/ (Emacs-style)
    - search string ([Shift-]F3)
    - smart word-by-word navigation
    - lexical selection (Shift-Up/Down)

 d. Navigation
    - history of recently visited directories (Alt-Left/Right/D on empty line)
    - cd to parent (Alt-Up)

 e. Other
    - smart prompt:
      - highlighted for readability
      - abbreviates path to save space
      - displays git and svn status
      - displays ERRORLEVEL (if > 0)
      - customizable
    - configuration file (init.py) for customizing colors, prompt etc.
    - Shift-PgUp/PgDn to scroll the buffer
    - expand ~ as %HOME% or %USERPROFILE%
    - Ctrl-D on an empty line closes PyCmd
    - show the current working directory in the window title


3. Known problems
-----------------
    - pushd/popd are not supported
    - when DelayedExpansion is disabled (PyCmd.exe /V:OFF), %ERRORLEVEL% is not
      properly processed
    - DOSKEY macros are not supported
    - can NOT be used to fully replace cmd.exe as default shell (e.g. via 
      %COMSPEC%)


4. Future plans
---------------
    - custom TAB-completion for the arguments of common commands
    - clean-up the mechanism that dispatches commands to cmd.exe (currently kind 
      of hacky)


5. How do I download/install/run it?
------------------------------------   
 a. Download the binary distribution (created with cx_freeze, see 
    http://cx-freeze.sourceforge.net/) from
          https://sourceforge.net/projects/pycmd/files/
    Then, unpack and start PyCmd.exe. No installation is necessary.

 b. Fetch the Python sources from the repository at
          git://pycmd.git.sourceforge.net/gitroot/pycmd
    then start PyCmd.py in Python or run 'make' to build the binary 
    distribution.
    You will need:
        - Python 3.10 from
                 http://www.python.org/download/
        - The pywin32 package (pip install pywin32)
        - The pefile package (pip install pefile)
    If you want to build (make), you'll also need:
        - cx_freeze (pip install cx_freeze)
        - MinGW from
                 http://www.mingw.org/ 


6. How do I report a crash/problem?
-----------------------------------
For any kind of bug, please use the bug tracker provided by SourceForge at
  http://sourceforge.net/tracker/?group_id=261720&atid=1127597
When reporting crashes, please try to locate and attach a crash log (look in
%APPDATA%\PyCmd for files named crash-yyyymmdd_hhmmss.log).


7. Credits
----------
   - The fish shell is an endless source of good ideas:
            http://fishshell.org/index.php
   - fsm.py is a nice package for implementing a Finite State Machine:
            http://code.activestate.com/recipes/146262



---------------------------------------------------
Horea Haitonic (h o r e a h _at_ g m a i l . c o m)