FLOW3 Plugin for Oh-My-ZSH

| 2 Comments

Are you on Mac or Linux? Which Shell do you use? If you did not think about this question yet, chances are that you use good old Bash. I have used Bash for ages, but recently, switched my working environment to ZSH.

The reason? Amazing autocompletion and a ZSH configuration system called oh-my-zsh which has been praised a lot.

Now, I had some time over the christmas holidays to work on a FLOW3 plugin for oh-my-zsh, which supports the following features:

  • The flow3 command is available everywhere inside the FLOW3 distribution, so you can call it from any subdirectory you want.
  • The flow3 command now supports autocompletion, both displaying the short help and the full help for a given command
  • Some additional helpers to easily run unit and functional tests: f3unittest and f3functionaltest
  • A way to mark a FLOW3 distribution as active, and directly cdinto any of its packages:
    cd /anywhere/you/want
    cd TYPO3.FLOW3

    Oh, did I mention that you also get autocompletion for the package keys? :-D

The full plugin is available on Github with installation instructions and a more in-depth readme. Go check it out!

… and of course tell me what you think; either via Twitter (@skurfuerst) or via replying :-)

Author: Sebastian

Sebastian is a co-founder of Sandstorm Media and its chief Software Architekt. He is a long-time member of the TYPO3 Project, particularily focussing on FLOW3 and TYPO3 Phoenix. He loves clean code, design patterns and agile methodologies, but tries to stay pragmatic at the same time.
He's also committed to making great technologies available to more people, that's why he is a member of the Extbase team and lead developer of the Fluid Template Engine. You can generally find him on most of the TYPO3 events, where he's speaking about many of the topics which interest him. If you meet, make sure to say hello :-)
When he's not spending his workdays in front of the computer, he can be found climbing in the Saxon Swizerland.

2 Comments

  1. Being bored myself i actually tried the very same thing over the holidays, you just beat me in timing ;) .
    I tried to create a typical zsh completion script, so our approaches may differ, but i hope we can somehow combine the scripts as i like some of your features.

    - Autocompletion is basically the same.
    - when you type “./flow3 doctrine:migrate” you won’t get the help entry, but the possible arguments will be listed ( so you will get a list of:
    –dry-run — Whether to do a dry run or not
    –output — A file to write SQL to, instead of executing it
    –version — The version to migrate to
    in zsh – style )
    - the “package:*” commands will autocomplete available Packages from the PackageStates.php file.
    - “./flow3 help ” will give you a list of command identifiers instead of the general help text.

    my script is far from finished, but you can have a look here:
    https://github.com/higrow/_flow3/

    greets,
    Martin

Leave a Reply

Required fields are marked *.

*