Hello everyone ! Today, I announce that a new version of Picobat is now available, providing a bunch of really interesting improvements. Check it out now and download it at the download page.

New features

We have been implementing some new features as well in addition to fixes to bugs.

Precedence changes

The precedence of commands (and especially FOR and IF commands) has been changed. As of version 218.1, operators like |, & and their derivatives owned precedence over any type of command. For instance IF %var%==test echo var & echo test would have been interpreted like (IF %var%==test echo var) & echo test. This behaviour was problematic as it broke the traditional syntax.

Version 218.2 fixes this introducing the concept of lookahead commands, that swallow everything on the right end side of the command. Thus, the previous line is now equivalent to:

IF %var%==test (echo var & echo test)

Currently, the only lookahead commands are IF and FOR.

As a consequence of these modifications, Picobat now supports an odd syntax using stream redirections, that is, any redirection encountered within IF or FOR part of the command line applies to the first command following (e.g. IF > foo 1==1 echo test & echo foo is equivalent to IF 1==1 (echo test > foo) & echo foo).



One of the features that has been the most requested was proper support of keyboard input for both Linux version and utf-8 version for windows. Those features have been implemented through linenoise and libcu8.

Among other improvements, Picobat now provides a proper autocompletion method for both Linux and Windows (only for utf-8 version). Instead of cloning the odd autocompletion method used by cmd, Picobat supports a bash-like autocompletion.

When <TAB> is pressed, Picobat extracts the last token and searches for files matching:

  • If there is no common match between the files matching, Picobat prints a list of files that matches the last token.

  • If there is a common match, Picobat completes the line with the longest common match.

New commands

As usual, the 218.2 version brings also a couple of news commands with it:

  • SETLOCAL and ENDLOCAL : creating new local environment and resuming old environment is now supported.
  • prompt : A cmd-compatible PROMPT and %PROMPT% implementation with a bunch of additions.
  • pecho : A command to print formats for the PROMPT command without affecting the actual %PROMPT%.
  • timeout : A cmd-compatible TIMEOUT with the possibility to sleep for milliseconds.

Experimental UNC support

The new windows version also include an experimental support of UNC paths without using a virtual drive letter. The CD command still does not supports it though.

Minor fixes

To end with, there is a few minor fixes also available:

  • Lots of minor fixes concerning locales and internationalization. Localization works perfectly using Windows. Dates are know formatted using the locale preferred format. A new locale for Hindi has been added thanks to Karanveer Chouhan.
  • Fixes to utf-8 version, especially to the interactive command-lines user routines.
  • Fixed a long standing bug with colours under Unix-like operating systems, that where shuffled compared to Windows.
  • Picobat_Auto.bat, the script loaded at startup, has been modified to contain default %PROMPT% value and the startup screen, so that both of these parameters are more easily customizable.