Giter Club home page Giter Club logo

ok-ps's Introduction

ok-ps

"ok" gives you .ok folder profiles for powershell

(There is also a bash version)

ok makes you smarter and more efficient.

Do you work on many different projects? And in each project, are there commands or URLs you use that are specific to that project? You need a .ok file.

A .ok file is a place to store any handy one-liners specific to the folder it is in. It can be viewed with a simple command. And commands in the .ok file can be executed immediately with the command ok {number} (example, ok 3 to run the 3rd command.)

Imagine your .ok file contains these three lines:

build.ps1 # builds the project
deploy.ps1 # deploys the project
commit_push.ps1 $arg[0] # commit with comment, rebase and push

A .ok file acts as a neat place to document how a given project works. This is useful if you have many projects, or many people working on a project. It's such a little file; it's quick to write and easy to edit.

But it's not just a document, it's executable.

If you run the command ok (with no parameters) you'll see the file listed, with numbers against each command:

> ok
1. build.ps1 # builds the project
2. deploy.ps1 # deploys the project
3. commit_push.ps1 $arg[0] # commit with comment, rebase and push

Then if you run ok {number} (ok followed by a number) you'll execute that line of the file.

> ok 1
> build.ps1 # builds the project
building.....

And you can pass simple arguments to the commands. For example:

> ok 3 "Added laser guidance system"
> commit_push.ps1 $arg[0] # commit with comment, rebase and push

Committing with comment "Added laser guidance system"
Commit succeeded.
Rebase successful
Pushing to master.

๐Ÿ’ก Tip: "." (i.e. source) the "_ok.ps1" script from your $profile, e.g:

. .\_ok.ps1

See http://secretgeek.net/ok for the blog post launching (and describing) "ok"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.