Hopefully it will eventually come true in ten years. :)
Current State: Primitive.
Some might not be related with Unish, but with Linux or in general with POSIX or UNIX.
How to
tilsuc: Unattended download of videos over unstable connection.Note: There is a shell script now, at commands/tilsuc.sh.
It seems more appropriate to add a
sleepin thewhileloop, when the main command doesn't support immediate re-entrance.tilsuc() { while true; do "${@}"; if [[ $? -eq 0 ]]; then break; fi; sleep 1; done; }; tilsuc youtube-dl --proxy 'socks5://127.0.0.1:1080' 'http://www.pbs.org/newshour/episode/pbs-newshour-full-episode-feb-24-2017/'If you have many Git repositories, this one-liner might come in handy.
Note that all my repositories are named in this format, '<name>.<vcs>'. For instance,
unish.git,unish.hgandunish.svn.find -maxdepth 1 -name '*.git' -exec sh -c 'cd {} && git status' \;Clean up compiled Python files before packaging or distributing.
find -name '*.pyc' -delete && find -name '__pycache__' -delete
I tend to use this
pylintrecently.E.g,
1000, to which pylint defaults, is not a good candidate for maximum line count, whereas999or9999is.Guess what?
I refuse to pay the space of a single character,
len('1000') - len('999'), for a single line,1000 - 999, when my editors always have line numbers on.pylint --reports n --output-format colorized --disable=missing-docstring,too-few-public-methods,too-many-ancestors,broad-except,invalid-name,too-many-locals,too-many-arguments,too-many-instance-attributes,too-many-public-methods,too-many-lines,too-many-branches,too-many-statements,duplicate-code
Unish may work only in Zsh 5.2 & Bash 4.3. You have been warned.
You are not recommended to use Unish directly. (It sucks :(.) Instead, absorbing or extracting and adapting some bits or pieces that fit in your needs.
But it's not abandoned and will be updated regularly as I experiment on various fancy stuffs.
Intentional command-not-found handler
Work in progress, prototype available.
For more details, see
py/found.py,py/fdb.py, as well as the command-not-found handling functions.
py/found.py and related code now reside in UrlMark.
$ # Search in Google or Bing, and many others. $ @google Who is the president of US $ @bing Who is the president of US $ # Open a website. $ @github $ # Search in dictionaries. $ @oxford pulchritude $ @urban '<3'
Smart Commands (Growing)
Commands with knowledge of their invocation environment and behave accordingly.
See the dedicated section below.
Logging Layer (Primitive)
I'm addicted to logs, and dream of writting fantastic ones, which give me a feeling that my code is more of myself, a human being, rather than some strange pieces run inside a cold machine.
Because it's me that wrote it!
Built-in Help Layer (Primitive)
Created by a previous Bash user who missed that handy
helpbuiltin and appreciated the fantasticrun-helpin Zsh world.Documentation generator (Ongoing)
I hate documentation that isn't generated from code.
Known exceptions: readme, changelog as well as commit messages.
Plugin Layer (Planned)