{"id":16521555,"url":"https://github.com/cyphunk/humanism.sh","last_synced_at":"2025-03-16T19:31:04.891Z","repository":{"id":27440656,"uuid":"30918763","full_name":"cyphunk/humanism.sh","owner":"cyphunk","description":"subjective but sensible defaults for shell use. Ubuntu, OSX, FreeBSD tested.","archived":false,"fork":false,"pushed_at":"2023-08-03T12:38:45.000Z","size":224,"stargazers_count":184,"open_issues_count":1,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-12T16:56:48.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"locuslab/convex_adversarial","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyphunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-17T13:47:17.000Z","updated_at":"2024-05-18T21:18:02.000Z","dependencies_parsed_at":"2023-01-14T06:45:36.918Z","dependency_job_id":null,"html_url":"https://github.com/cyphunk/humanism.sh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphunk%2Fhumanism.sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphunk%2Fhumanism.sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphunk%2Fhumanism.sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphunk%2Fhumanism.sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyphunk","download_url":"https://codeload.github.com/cyphunk/humanism.sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221667198,"owners_count":16860569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T16:56:56.789Z","updated_at":"2024-10-27T11:09:06.195Z","avatar_url":"https://github.com/cyphunk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Humanism.sh\n\nThese commands attempt to introduce some humanism to POSIX users by providing\nsensible defaults to basic commands and changing the basic functionality of some\nso as to free neurons for use on something other than remembering command flags.\nThis effort ignores with intent the response \"it only takes you one more second\nto do it the normal way.\"\n\nExamples: ``cd`` use typically includes only one argument: a directory. With\nthat assumption this seems absurd:\n``cd ./to\\ some\\ directory``. And ``history`` and ``ps`` are\nrarely used without ``grep``. ``find`` is typically used to fuzzy search for a\nfile name so why isn't ``-iname \"*$@*\"`` the default?\n\nSome commands herein alter workflow more intrusively. The ``c`` command,\nintended to replace cd, will search forward and backward looking for a directory\nthat matches any part of the argument filter. Though subtle this change makes\nmoving through the file systems similar to using command launchers found in\nmodern OS UI's (cmd+space osx, alt+F2 ubuntu). The ``ap`` command unifies\npackage searching, installation and information making finding needed\ndependencies or files easier. ``sshrc`` can be used to carry humanism\n(inspired by Russen91's [sshrc](https://github.com/Russell91/sshrc)).\n``alias ssh=sshrc`` and take it wherever you go.\n\n## Installation\n\nTo load all commands for each new terminal shell (bash/zsh/sh compatible) source\nthe file in your profile or bashrc:\n\n    source humanism.sh\n\nAlternatively you can load commands selectively ``source humanism.sh \u003ccmd\u003e``\nor execute ``humanism.sh help`` to see list of commands.\n\nYou are likely use `ap` and in some cases `dbg` via sudo/root so link these\nscripts into a PATH'ed bin:\n\n    sudo ln -s \u003chumanism.sh_path\u003e/dbg /usr/local/bin\n    sudo ln -s \u003chumanism.sh_path\u003e/ap.\u003cversion\u003e /usr/local/bin\n\nCommands have been tested on OSX, Ubuntu and FreeBSD and various virtual hosts\nand embedded devices. If you find errors please execute the dependency test\nscript ``sh -x test/requirements.sh`` and submit an issue on github.\n\n## Use\n\n### c (cd)\n\n    c            go to last dir\n    c \u003cFiLteR\u003e   go to path, if not in cwd search forward and backward for\n                 *FiLtEr* in tree\n\n![example c use](/examples/c.gif)\n\nDetails:\n\n    c \u003cfIlTeR\u003e            go to path or find and goto filter  \n                          1. if filter is path, goto  \n                          2. if filter is name in tag db, goto  \n                          3. if filter found under cwd, goto  \n                          4. if filter found above cwd, goto\n    c \u003cfIlTeR\u003e \u003cfIlTeR\u003e   filter cascading. find filter, then Nth filter under it  \n    c \u003ctag\u003e \u003ctag\u003e         tag cascading\n    c \u003ctag\u003e \u003cfIlTeR\u003e      combined. many tags, one filter  \n    l \u003ctag\u003e \u003cfIlTeR\u003e      ls that adheres to all of the above  \n\nManaging Tags:\n\nTags get created either manually using these commands or automatically when a\n``c fIlTeR`` is found.\n\n    cc                    list tags  \n    cc \u003ctag\u003e              add/remove/rename \u003ctag\u003e for pwd  \n                          prompt to delete if \u003ctag\u003e exists  \n    cc d   \u003ctag\u003e  \n    cc del \u003ctag\u003e          explicit delete  \n\nTo disable auto tagging set ``HUMANISM_C_TAG_AUTO=0`` before sourcing humanism.sh\n\n### find\n\n    find \u003cfilter\u003e          find *FiLtEr* anywhere under cwd\n    find \u003cpath\u003e \u003cfilter\u003e   find *FiLtEr* anywhere under path\n    find $1 $2 $3 ...      pass through to normal find\n\n![example find use](/examples/find.gif)\n\n\n### history\n\n    history            list\n    history \u003cfilter\u003e   greped history\n\n![example history use](/examples/history.gif)\n\n### ps\n\n    ps                            list\n    ps \u003cfilter\u003e                   filtered\n    ps \u003cfilter\u003e | killps [-SIG]   kill procs\n\n### log\n\nUsed to create a record of work by appending commands and messages to ./run.sh\nfrom bash history.\n\n    log          \t   show recent commands and select which are recorded\n    log some message   append echo message to run.sh\n    log \u003cN\u003e      \t   append Nth cmd from last. e.g. ``log 1``    adds last cmd\n\n\n### ap\n\nUnify apt-get, apt-cache and dpkg on Linux, homebrew on OSX or pkgng on Freebsd.\nMakes searching for needed files or packages a bit easier.\n\n    install)  \n    Install package\n\n    reinstall)  \n    Re-install package\n\n    remove)  \n    Uninstall and purge of all deps no longer required\n\n    updatesecurity)  \n    Install security updates\n\n    search)  \n    Show packages available or already installed\n\n    ownerof)  \n    Show package for file\n\n    ineed)  \n    Show packages that would provide a file if installed\n\n    ineedbadly)  \n    Show any package that contains string\n\n    info)  \n    information about package\n\n    list)  \n    show files installed by package\n\n    *)  \n    pass through any other command on to apt-get\n\n### dbg\n\nUnify strace|dtruss and lsof.\n\n    trace)\n     strace all child processes of supplied command, pid or proc name\n\n    openfiles)\n     Show open files of an already running processes and its children, by name\n\n    fileprocs)\n     Show pid's touching file\n\n    libtree)\n     using strings alone give .so dependency for file\n     use: dbg libtree \u003cTARGET\u003e [ignorelibs]\n     ie:  dbg libtree \u003cTARGET\u003e [ld.so.1 libc.so libpthread.so.0 libc.so.6]\n\n    canexe)\n     pick an executable and it's dependencies.\n     e.g. grab arm executables from one firmware and use on another\n    \n     tries to determine libs with ldd first, then dbg libtree\n    \n     use: dbg canexe \u003cTARGET\u003e [ignorelibs]\n     ie:  dbg canexe \u003cTARGET\u003e [ld.so.1 libc.so libpthread.so.0 libc.so.6]\n\n    demanglecpp)\n     pipe strings into c++filt to demangle names\n\n### sshrc\n\ncarry all of the above commands with you. Will source ``myrc`` file from\nhumanism.sh base directory, if it exists. Personally I've set ``alias ssh=sshrc``\nin myrc so that I don't forget to carry this with me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphunk%2Fhumanism.sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyphunk%2Fhumanism.sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphunk%2Fhumanism.sh/lists"}