irapha / same-tbh Goto Github PK
View Code? Open in Web Editor NEWVim-like macros for bash
Vim-like macros for bash
$ tbh
tbh (recording) $ tbh
tbh (recording) $ donezo
gottem
tbh (recording) $ donezo
gottem
$ tbh same
same $ tbh
tbh (recording) $ donezo (<- I had to type this...)
gottem
gottem
$
Should the commands inside the nested tbh be recorded in the outter tbh?
Use case:
$ tbh a
tbh (recording) $ mkdir hey
tbh (recording) $ donezo
gottem
$ same a
mkdir hey
$
$ tbh
tbh (recording) $ mkdir hey
tbh (recording) $ donezo
gottem
$ rm -rf hey
$ tbh same except stfu
$ ls
hey other_files
$
instead of:
$ tbh
[do things]
$ same
[things are done]
we could have:
$ tbh
[do things]
$ tbh same
[things are done]
tbh (recording) $ done[TAB]
becomes...
tbh (recording) $ donezo
$ tbh
tbh (recording) $ ls
README.md same tbh
tbh (recording) $ cd ..
tbh (recording) $ ls
README.md same tbh
Use case:
$ tbh
tbh (recording) $ mkdir hey
tbh (recording) $ mkdir hi
tbh (recording) $ donezo
gottem
$ tbh same except opposite
mkdir hi
mkdir hey
$
maybe...
$ tbh ?
or
$ tbh wtf
Instead of going through commands in reverse, it should revert the effects of the macro.
There are a couple ways I am thinking this can be done, but many involve too much memory, especially the ones that involve saving contents of files.
Use case:
$ tbh
tbh (recording) $ mkdir hey
tbh (recording) $ donezo
gottem
$ tbh same except hey=hi
mkdir hi
$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.