├── .gitignore ├── README.md ├── bootstrap.sh ├── home ├── .config │ └── nvim │ │ ├── .netrwhist │ │ ├── after │ │ └── ftplugin.vim │ │ └── init.vim ├── .dlv │ └── config.yml ├── .editrc ├── .gitconfig ├── .gitconfig.bannzai ├── .gitignore ├── .lldbinit ├── .pryrc ├── .ssh │ └── config ├── .tmux.conf ├── .vim │ ├── autoload │ │ └── plug.vim │ ├── colors │ │ └── molokai.vim │ └── ftdetect │ │ ├── go.vim │ │ ├── ruby.vim │ │ └── ts.vim ├── .vimrc ├── .zprezto │ ├── .editorconfig │ ├── .github │ │ ├── ISSUE_TEMPLATE.md │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── .gitignore │ ├── .gitmodules │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── init.zsh │ ├── modules │ │ ├── README.md │ │ ├── archive │ │ │ ├── README.md │ │ │ └── functions │ │ │ │ ├── _lsarchive │ │ │ │ ├── _unarchive │ │ │ │ ├── archive │ │ │ │ ├── lsarchive │ │ │ │ └── unarchive │ │ ├── autosuggestions │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── .editorconfig │ │ │ │ ├── .rspec │ │ │ │ ├── .rubocop.yml │ │ │ │ ├── .ruby-version │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── DESCRIPTION │ │ │ │ ├── Gemfile │ │ │ │ ├── Gemfile.lock │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── URL │ │ │ │ ├── VERSION │ │ │ │ ├── circle.yml │ │ │ │ ├── spec │ │ │ │ │ ├── integrations │ │ │ │ │ │ ├── bracketed_paste_magic_spec.rb │ │ │ │ │ │ ├── client_zpty_spec.rb │ │ │ │ │ │ ├── rebound_bracket_spec.rb │ │ │ │ │ │ ├── wrapped_widget_spec.rb │ │ │ │ │ │ └── zle_input_stack_spec.rb │ │ │ │ │ ├── multi_line_spec.rb │ │ │ │ │ ├── options │ │ │ │ │ │ ├── async_zpty_name_spec.rb │ │ │ │ │ │ ├── buffer_max_size_spec.rb │ │ │ │ │ │ ├── highlight_style_spec.rb │ │ │ │ │ │ ├── original_widget_prefix_spec.rb │ │ │ │ │ │ ├── strategy_spec.rb │ │ │ │ │ │ ├── use_async_spec.rb │ │ │ │ │ │ └── widget_lists_spec.rb │ │ │ │ │ ├── spec_helper.rb │ │ │ │ │ ├── strategies │ │ │ │ │ │ ├── default_spec.rb │ │ │ │ │ │ ├── match_prev_cmd_spec.rb │ │ │ │ │ │ └── special_characters_helper.rb │ │ │ │ │ ├── terminal_session.rb │ │ │ │ │ └── widgets │ │ │ │ │ │ ├── disable_spec.rb │ │ │ │ │ │ ├── enable_spec.rb │ │ │ │ │ │ ├── fetch_spec.rb │ │ │ │ │ │ └── toggle_spec.rb │ │ │ │ ├── src │ │ │ │ │ ├── async.zsh │ │ │ │ │ ├── bind.zsh │ │ │ │ │ ├── config.zsh │ │ │ │ │ ├── features.zsh │ │ │ │ │ ├── highlight.zsh │ │ │ │ │ ├── setup.zsh │ │ │ │ │ ├── start.zsh │ │ │ │ │ ├── strategies │ │ │ │ │ │ ├── default.zsh │ │ │ │ │ │ └── match_prev_cmd.zsh │ │ │ │ │ ├── util.zsh │ │ │ │ │ └── widgets.zsh │ │ │ │ ├── zsh-autosuggestions.plugin.zsh │ │ │ │ └── zsh-autosuggestions.zsh │ │ │ └── init.zsh │ │ ├── command-not-found │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── completion │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── .editorconfig │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── src │ │ │ │ │ ├── _ack │ │ │ │ │ ├── _afew │ │ │ │ │ ├── _ag │ │ │ │ │ ├── _android │ │ │ │ │ ├── _ansible │ │ │ │ │ ├── _ansible-galaxy │ │ │ │ │ ├── _ansible-playbook │ │ │ │ │ ├── _ansible-vault │ │ │ │ │ ├── _archlinux-java │ │ │ │ │ ├── _artisan │ │ │ │ │ ├── _atach │ │ │ │ │ ├── _bitcoin-cli │ │ │ │ │ ├── _bower │ │ │ │ │ ├── _bundle │ │ │ │ │ ├── _cap │ │ │ │ │ ├── _cask │ │ │ │ │ ├── _cf │ │ │ │ │ ├── _chattr │ │ │ │ │ ├── _cheat │ │ │ │ │ ├── _choc │ │ │ │ │ ├── _cmake │ │ │ │ │ ├── _coffee │ │ │ │ │ ├── _column │ │ │ │ │ ├── _composer │ │ │ │ │ ├── _console │ │ │ │ │ ├── _dad │ │ │ │ │ ├── _debuild │ │ │ │ │ ├── _dget │ │ │ │ │ ├── _dhcpcd │ │ │ │ │ ├── _diana │ │ │ │ │ ├── _docpad │ │ │ │ │ ├── _drush │ │ │ │ │ ├── _emulator │ │ │ │ │ ├── _envdir │ │ │ │ │ ├── _exportfs │ │ │ │ │ ├── _fab │ │ │ │ │ ├── _ffind │ │ │ │ │ ├── _fleetctl │ │ │ │ │ ├── _force │ │ │ │ │ ├── _gas │ │ │ │ │ ├── _geany │ │ │ │ │ ├── _ghc │ │ │ │ │ ├── _gist │ │ │ │ │ ├── _git-flow │ │ │ │ │ ├── _git-journal │ │ │ │ │ ├── _git-pulls │ │ │ │ │ ├── _git-wtf │ │ │ │ │ ├── _glances │ │ │ │ │ ├── _go │ │ │ │ │ ├── _google │ │ │ │ │ ├── _gtk-launch │ │ │ │ │ ├── _homestead │ │ │ │ │ ├── _httpie │ │ │ │ │ ├── _jmeter │ │ │ │ │ ├── _jmeter-plugins │ │ │ │ │ ├── _jonas │ │ │ │ │ ├── _jq │ │ │ │ │ ├── _jrnl │ │ │ │ │ ├── _kak │ │ │ │ │ ├── _kitchen │ │ │ │ │ ├── _knife │ │ │ │ │ ├── _language_codes │ │ │ │ │ ├── _lsattr │ │ │ │ │ ├── _lsblk │ │ │ │ │ ├── _lunchy │ │ │ │ │ ├── _middleman │ │ │ │ │ ├── _mina │ │ │ │ │ ├── _mix │ │ │ │ │ ├── _multirust │ │ │ │ │ ├── _mussh │ │ │ │ │ ├── _mvn │ │ │ │ │ ├── _node │ │ │ │ │ ├── _nvm │ │ │ │ │ ├── _openssl │ │ │ │ │ ├── _optirun │ │ │ │ │ ├── _paste │ │ │ │ │ ├── _patool │ │ │ │ │ ├── _perf │ │ │ │ │ ├── _periscope │ │ │ │ │ ├── _pgsql_utils │ │ │ │ │ ├── _phing │ │ │ │ │ ├── _pixz │ │ │ │ │ ├── _pkcon │ │ │ │ │ ├── _play │ │ │ │ │ ├── _port │ │ │ │ │ ├── _pygmentize │ │ │ │ │ ├── _rails │ │ │ │ │ ├── _ralio │ │ │ │ │ ├── _rclone │ │ │ │ │ ├── _redis-cli │ │ │ │ │ ├── _rfkill │ │ │ │ │ ├── _rkt │ │ │ │ │ ├── _rslsync │ │ │ │ │ ├── _rspec │ │ │ │ │ ├── _rsvm │ │ │ │ │ ├── _rubocop │ │ │ │ │ ├── _rvm │ │ │ │ │ ├── _sbt │ │ │ │ │ ├── _scala │ │ │ │ │ ├── _scl │ │ │ │ │ ├── _scrub │ │ │ │ │ ├── _sdd │ │ │ │ │ ├── _setcap │ │ │ │ │ ├── _setup.py │ │ │ │ │ ├── _showoff │ │ │ │ │ ├── _shutdown │ │ │ │ │ ├── _smartmontools │ │ │ │ │ ├── _srm │ │ │ │ │ ├── _ssh-copy-id │ │ │ │ │ ├── _stack │ │ │ │ │ ├── _subl │ │ │ │ │ ├── _subliminal │ │ │ │ │ ├── _supervisorctl │ │ │ │ │ ├── _svm │ │ │ │ │ ├── _teamocil │ │ │ │ │ ├── _thor │ │ │ │ │ ├── _tmuxinator │ │ │ │ │ ├── _trash-empty │ │ │ │ │ ├── _trash-list │ │ │ │ │ ├── _trash-put │ │ │ │ │ ├── _trash-restore │ │ │ │ │ ├── _udisksctl │ │ │ │ │ ├── _ufw │ │ │ │ │ ├── _vagrant │ │ │ │ │ ├── _virsh │ │ │ │ │ ├── _virtualbox │ │ │ │ │ ├── _vnstat │ │ │ │ │ ├── _vpnc │ │ │ │ │ ├── _wemux │ │ │ │ │ ├── _xinput │ │ │ │ │ ├── _yaourt │ │ │ │ │ ├── _yarn │ │ │ │ │ └── _zcash-cli │ │ │ │ ├── zsh-completions-howto.org │ │ │ │ └── zsh-completions.plugin.zsh │ │ │ └── init.zsh │ │ ├── directory │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── dnf │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── docker │ │ │ ├── README.md │ │ │ ├── alias.zsh │ │ │ └── init.zsh │ │ ├── dpkg │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── deb-clone │ │ │ │ ├── deb-history │ │ │ │ └── deb-kbuild │ │ │ └── init.zsh │ │ ├── editor │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── emacs │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── environment │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── fasd │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── INSTALL.md │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── fasd │ │ │ │ ├── fasd.1 │ │ │ │ └── fasd.1.md │ │ │ └── init.zsh │ │ ├── git │ │ │ ├── README.md │ │ │ ├── alias.zsh │ │ │ ├── functions │ │ │ │ ├── _git-hub-browse │ │ │ │ ├── _git-hub-shorten-url │ │ │ │ ├── _git-info │ │ │ │ ├── _git-submodule-move │ │ │ │ ├── _git-submodule-remove │ │ │ │ ├── git-branch-current │ │ │ │ ├── git-commit-lost │ │ │ │ ├── git-dir │ │ │ │ ├── git-hub-browse │ │ │ │ ├── git-hub-shorten-url │ │ │ │ ├── git-info │ │ │ │ ├── git-root │ │ │ │ ├── git-stash-clear-interactive │ │ │ │ ├── git-stash-dropped │ │ │ │ ├── git-stash-recover │ │ │ │ ├── git-submodule-move │ │ │ │ └── git-submodule-remove │ │ │ └── init.zsh │ │ ├── gnu-utility │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── gpg │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── haskell │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── helper │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ └── add-zsh-trap │ │ │ └── init.zsh │ │ ├── history-substring-search │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ └── zsh-history-substring-search.zsh │ │ │ └── init.zsh │ │ ├── history │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── homebrew │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── macports │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── node │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── node-doc │ │ │ │ └── node-info │ │ │ └── init.zsh │ │ ├── ocaml │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── osx │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── _mand_manp │ │ │ │ ├── mand │ │ │ │ ├── manp │ │ │ │ ├── osx-ls-download-history │ │ │ │ ├── osx-rm-dir-metadata │ │ │ │ ├── osx-rm-download-history │ │ │ │ ├── pfd │ │ │ │ ├── pfs │ │ │ │ ├── ql │ │ │ │ └── tab │ │ │ └── init.zsh │ │ ├── pacman │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── pacman-list-disowned │ │ │ │ └── pacman-list-explicit │ │ │ └── init.zsh │ │ ├── perl │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ └── perl-info │ │ │ └── init.zsh │ │ ├── prompt │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── agnoster │ │ │ │ │ ├── README.md │ │ │ │ │ ├── agnoster.zsh-theme │ │ │ │ │ ├── characters.png │ │ │ │ │ └── screenshot.png │ │ │ │ ├── async │ │ │ │ │ ├── .editorconfig │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── async.plugin.zsh │ │ │ │ │ ├── async.zsh │ │ │ │ │ ├── async_test.zsh │ │ │ │ │ └── test.zsh │ │ │ │ ├── powerlevel9k │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .gitmodules │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── TESTS.md │ │ │ │ │ ├── docker │ │ │ │ │ │ ├── antibody │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── antigen │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── base-4.3.11 │ │ │ │ │ │ │ └── Dockerfile │ │ │ │ │ │ ├── base-5.0.3 │ │ │ │ │ │ │ └── Dockerfile │ │ │ │ │ │ ├── base-5.1.1 │ │ │ │ │ │ │ └── Dockerfile │ │ │ │ │ │ ├── base-5.2 │ │ │ │ │ │ │ └── Dockerfile │ │ │ │ │ │ ├── dotfile │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── fred-sudoers │ │ │ │ │ │ ├── omz │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── prezto │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ └── install.zsh │ │ │ │ │ │ ├── zgen │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── zim │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ └── install.zsh │ │ │ │ │ │ ├── zplug │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ ├── zplugin │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc.plugins │ │ │ │ │ │ ├── zpm │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ ├── install.zsh │ │ │ │ │ │ │ └── zshrc │ │ │ │ │ │ └── zulu │ │ │ │ │ │ │ ├── Dockerfile │ │ │ │ │ │ │ └── install.zsh │ │ │ │ │ ├── functions │ │ │ │ │ │ ├── colors.zsh │ │ │ │ │ │ ├── icons.zsh │ │ │ │ │ │ ├── utilities.zsh │ │ │ │ │ │ └── vcs.zsh │ │ │ │ │ ├── powerlevel9k.zsh-theme │ │ │ │ │ ├── prompt_powerlevel9k_setup │ │ │ │ │ ├── shunit2 │ │ │ │ │ │ ├── source │ │ │ │ │ │ │ ├── 2.0 │ │ │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ │ │ ├── docbookPrep.sh │ │ │ │ │ │ │ │ │ ├── extractDocs.pl │ │ │ │ │ │ │ │ │ └── which │ │ │ │ │ │ │ │ ├── doc │ │ │ │ │ │ │ │ │ ├── CHANGES-2.0.txt │ │ │ │ │ │ │ │ │ ├── LGPL-2.1 │ │ │ │ │ │ │ │ │ ├── README.txt │ │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.0.0.txt │ │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.0.1.txt │ │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.0.2.txt │ │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.0.3.txt │ │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.0.4.txt │ │ │ │ │ │ │ │ │ ├── TODO.txt │ │ │ │ │ │ │ │ │ ├── contributors.txt │ │ │ │ │ │ │ │ │ ├── design_doc.txt │ │ │ │ │ │ │ │ │ ├── shunit2.html │ │ │ │ │ │ │ │ │ └── style.css │ │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ │ └── sh │ │ │ │ │ │ │ │ │ │ └── shlib │ │ │ │ │ │ │ │ ├── share │ │ │ │ │ │ │ │ │ ├── docbook │ │ │ │ │ │ │ │ │ │ └── tldp-xsl │ │ │ │ │ │ │ │ │ │ │ └── 21MAR2004 │ │ │ │ │ │ │ │ │ │ │ ├── fo │ │ │ │ │ │ │ │ │ │ │ └── tldp-print.xsl │ │ │ │ │ │ │ │ │ │ │ └── html │ │ │ │ │ │ │ │ │ │ │ ├── tldp-common.xsl │ │ │ │ │ │ │ │ │ │ │ └── tldp-one-page.xsl │ │ │ │ │ │ │ │ │ └── resources │ │ │ │ │ │ │ │ │ │ └── shelldoc.xslt │ │ │ │ │ │ │ │ └── src │ │ │ │ │ │ │ │ │ ├── docbook │ │ │ │ │ │ │ │ │ ├── functions.xml │ │ │ │ │ │ │ │ │ ├── introduction.xml │ │ │ │ │ │ │ │ │ ├── quickstart.xml │ │ │ │ │ │ │ │ │ └── shunit2.xml │ │ │ │ │ │ │ │ │ ├── shell │ │ │ │ │ │ │ │ │ └── shunit2 │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ │ ├── run-test-suite │ │ │ │ │ │ │ │ │ ├── test-functions.inc │ │ │ │ │ │ │ │ │ ├── testAsserts │ │ │ │ │ │ │ │ │ ├── testFailures │ │ │ │ │ │ │ │ │ ├── testInternalFx │ │ │ │ │ │ │ │ │ └── testSuiteFx │ │ │ │ │ │ │ └── 2.1 │ │ │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ │ ├── gen_test_results.flags │ │ │ │ │ │ │ │ ├── gen_test_results.sh │ │ │ │ │ │ │ │ └── which │ │ │ │ │ │ │ │ ├── doc │ │ │ │ │ │ │ │ ├── CHANGES-2.1.txt │ │ │ │ │ │ │ │ ├── README.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.0.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.1.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.2.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.3.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.4.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.5.txt │ │ │ │ │ │ │ │ ├── RELEASE_NOTES-2.1.6.txt │ │ │ │ │ │ │ │ ├── TODO.txt │ │ │ │ │ │ │ │ ├── coding_standards.txt │ │ │ │ │ │ │ │ ├── contributors.txt │ │ │ │ │ │ │ │ ├── design_doc.txt │ │ │ │ │ │ │ │ ├── lgpl-2.1.txt │ │ │ │ │ │ │ │ ├── rst2html.css │ │ │ │ │ │ │ │ ├── shunit2.html │ │ │ │ │ │ │ │ └── shunit2.txt │ │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ │ ├── equality_test.sh │ │ │ │ │ │ │ │ ├── lineno_test.sh │ │ │ │ │ │ │ │ ├── math.inc │ │ │ │ │ │ │ │ ├── math_test.sh │ │ │ │ │ │ │ │ ├── mkdir_test.sh │ │ │ │ │ │ │ │ └── party_test.sh │ │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── shflags │ │ │ │ │ │ │ │ ├── shlib │ │ │ │ │ │ │ │ └── versions │ │ │ │ │ │ │ │ └── src │ │ │ │ │ │ │ │ ├── shunit2 │ │ │ │ │ │ │ │ ├── shunit2_test.sh │ │ │ │ │ │ │ │ ├── shunit2_test_asserts.sh │ │ │ │ │ │ │ │ ├── shunit2_test_failures.sh │ │ │ │ │ │ │ │ ├── shunit2_test_helpers │ │ │ │ │ │ │ │ ├── shunit2_test_macros.sh │ │ │ │ │ │ │ │ ├── shunit2_test_misc.sh │ │ │ │ │ │ │ │ └── shunit2_test_standalone.sh │ │ │ │ │ │ └── website │ │ │ │ │ │ │ ├── README.html │ │ │ │ │ │ │ ├── releases │ │ │ │ │ │ │ ├── .htaccess │ │ │ │ │ │ │ ├── shunit2-2.0.0.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.0.0.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.0.1.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.0.1.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.0.2.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.0.2.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.0.3.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.0.3.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.1.0.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.1.0.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.1.1.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.1.1.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.1.2.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.1.2.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.1.3.tgz.md5 │ │ │ │ │ │ │ ├── shunit2-2.1.3.tgz.sig │ │ │ │ │ │ │ ├── shunit2-2.1.4.tgz.sig │ │ │ │ │ │ │ └── shunit2-2.1.5.tgz.sig │ │ │ │ │ │ │ └── testresults │ │ │ │ │ │ │ ├── 2.1.2 │ │ │ │ │ │ │ ├── Linux-Ubuntu_Dapper-6.04.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu_Gutsy-7.10.txt │ │ │ │ │ │ │ ├── Mac_OS_X-10.4.1.txt │ │ │ │ │ │ │ └── Solaris-10-U3-x86.txt │ │ │ │ │ │ │ ├── 2.1.3 │ │ │ │ │ │ │ ├── Cygwin.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu_Hardy-8.04.txt │ │ │ │ │ │ │ ├── Mac_OS_X-10.5.2.txt │ │ │ │ │ │ │ └── Solaris-11-x86.txt │ │ │ │ │ │ │ ├── 2.1.4 │ │ │ │ │ │ │ ├── Cygwin-Windows_XP.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu_Dapper-6.06.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu_Hardy-8.04.txt │ │ │ │ │ │ │ ├── Mac_OS_X-10.5.4.txt │ │ │ │ │ │ │ ├── Solaris-9-U6-x86.txt │ │ │ │ │ │ │ └── Solaris-nv-77-x86.txt │ │ │ │ │ │ │ ├── 2.1.5 │ │ │ │ │ │ │ ├── Cygwin-5.1.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-6.06.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-8.04.txt │ │ │ │ │ │ │ ├── Mac_OS_X-10.5.5.txt │ │ │ │ │ │ │ ├── Solaris-11.txt │ │ │ │ │ │ │ └── Solaris-9.txt │ │ │ │ │ │ │ ├── 2.1.6 │ │ │ │ │ │ │ ├── Cygwin-1.7.9.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-10.04.2-LTS.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-6.06.2-LTS.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-8.04.4-LTS.txt │ │ │ │ │ │ │ ├── Mac_OS_X-10.6.7.txt │ │ │ │ │ │ │ ├── OpenSolaris-2009.06.txt │ │ │ │ │ │ │ ├── Solaris-8u7.txt │ │ │ │ │ │ │ ├── Solaris-9u6.txt │ │ │ │ │ │ │ └── Solaris-9u8.txt │ │ │ │ │ │ │ └── 2.1.7 │ │ │ │ │ │ │ ├── Linux-Ubuntu-10.04.4-LTS.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-12.04.2-LTS.txt │ │ │ │ │ │ │ ├── Linux-Ubuntu-8.04.4-LTS.txt │ │ │ │ │ │ │ ├── OpenSolaris-2009.06(snv_111b).txt │ │ │ │ │ │ │ └── Solaris-10u10.txt │ │ │ │ │ ├── test-bsd-vm │ │ │ │ │ │ ├── Vagrantfile │ │ │ │ │ │ ├── bootstrap-zero.sh │ │ │ │ │ │ └── bootstrap.sh │ │ │ │ │ ├── test-in-docker │ │ │ │ │ ├── test-vm-providers │ │ │ │ │ │ ├── plain.sh │ │ │ │ │ │ └── setup-environment.sh │ │ │ │ │ ├── test-vm │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── Vagrantfile │ │ │ │ │ │ ├── antigen.sh │ │ │ │ │ │ ├── bootstrap.sh │ │ │ │ │ │ ├── omz.sh │ │ │ │ │ │ └── prezto.sh │ │ │ │ │ └── test │ │ │ │ │ │ ├── functions │ │ │ │ │ │ ├── colors.spec │ │ │ │ │ │ ├── icons.spec │ │ │ │ │ │ └── utilities.spec │ │ │ │ │ │ ├── powerlevel9k.spec │ │ │ │ │ │ └── segments │ │ │ │ │ │ ├── command_execution_time.spec │ │ │ │ │ │ ├── dir.spec │ │ │ │ │ │ ├── go_version.spec │ │ │ │ │ │ ├── kubecontext.spec │ │ │ │ │ │ ├── rust_version.spec │ │ │ │ │ │ └── vcs.spec │ │ │ │ ├── powerline │ │ │ │ │ ├── README.md │ │ │ │ │ ├── prompt.png │ │ │ │ │ └── prompt_powerline_setup │ │ │ │ └── pure │ │ │ │ │ ├── .editorconfig │ │ │ │ │ ├── .gitattributes │ │ │ │ │ ├── .github │ │ │ │ │ └── issue_template.md │ │ │ │ │ ├── arch │ │ │ │ │ └── PKGBUILD │ │ │ │ │ ├── async.zsh │ │ │ │ │ ├── license │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pure.plugin.zsh │ │ │ │ │ ├── pure.zsh │ │ │ │ │ ├── readme.md │ │ │ │ │ ├── screenshot-title-cmd.png │ │ │ │ │ └── screenshot.png │ │ │ ├── functions │ │ │ │ ├── async │ │ │ │ ├── prompt-pwd │ │ │ │ ├── prompt_agnoster_setup │ │ │ │ ├── prompt_cloud_setup │ │ │ │ ├── prompt_damoekri_setup │ │ │ │ ├── prompt_giddie_setup │ │ │ │ ├── prompt_kylewest_setup │ │ │ │ ├── prompt_minimal_setup │ │ │ │ ├── prompt_nicoulaj_setup │ │ │ │ ├── prompt_paradox_setup │ │ │ │ ├── prompt_peepcode_setup │ │ │ │ ├── prompt_powerlevel9k_setup │ │ │ │ ├── prompt_powerline_setup │ │ │ │ ├── prompt_pure_setup │ │ │ │ ├── prompt_skwp_setup │ │ │ │ ├── prompt_smiley_setup │ │ │ │ ├── prompt_sorin_setup │ │ │ │ └── prompt_steeef_setup │ │ │ └── init.zsh │ │ ├── python │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ └── python-info │ │ │ └── init.zsh │ │ ├── rails │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── rsync │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── ruby │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── ruby-app-root │ │ │ │ └── ruby-info │ │ │ └── init.zsh │ │ ├── screen │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── spectrum │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── ssh │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── syntax-highlighting │ │ │ ├── README.md │ │ │ ├── external │ │ │ │ ├── .gitattributes │ │ │ │ ├── .gitignore │ │ │ │ ├── .revision-hash │ │ │ │ ├── .travis.yml │ │ │ │ ├── .version │ │ │ │ ├── COPYING.md │ │ │ │ ├── HACKING.md │ │ │ │ ├── INSTALL.md │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── changelog.md │ │ │ │ ├── docs │ │ │ │ │ ├── highlighters.md │ │ │ │ │ └── highlighters │ │ │ │ │ │ ├── brackets.md │ │ │ │ │ │ ├── cursor.md │ │ │ │ │ │ ├── line.md │ │ │ │ │ │ ├── main.md │ │ │ │ │ │ ├── pattern.md │ │ │ │ │ │ └── root.md │ │ │ │ ├── highlighters │ │ │ │ │ ├── README.md │ │ │ │ │ ├── brackets │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── brackets-highlighter.zsh │ │ │ │ │ │ └── test-data │ │ │ │ │ │ │ ├── cursor-matchingbracket-line-finish.zsh │ │ │ │ │ │ │ ├── cursor-matchingbracket.zsh │ │ │ │ │ │ │ ├── empty-styles.zsh │ │ │ │ │ │ │ ├── loop-styles.zsh │ │ │ │ │ │ │ ├── mismatch-patentheses.zsh │ │ │ │ │ │ │ ├── near-quotes.zsh │ │ │ │ │ │ │ ├── nested-parentheses.zsh │ │ │ │ │ │ │ ├── nested-quote.zsh │ │ │ │ │ │ │ ├── quoted-patentheses.zsh │ │ │ │ │ │ │ ├── simple-parentheses.zsh │ │ │ │ │ │ │ ├── unclosed-patentheses.zsh │ │ │ │ │ │ │ └── unclosed-patentheses2.zsh │ │ │ │ │ ├── cursor │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── cursor-highlighter.zsh │ │ │ │ │ ├── line │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── line-highlighter.zsh │ │ │ │ │ ├── main │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── main-highlighter.zsh │ │ │ │ │ │ └── test-data │ │ │ │ │ │ │ ├── alias-assignment1.zsh │ │ │ │ │ │ │ ├── alias.zsh │ │ │ │ │ │ │ ├── always1.zsh │ │ │ │ │ │ │ ├── always2.zsh │ │ │ │ │ │ │ ├── always3.zsh │ │ │ │ │ │ │ ├── anonymous-function.zsh │ │ │ │ │ │ │ ├── arg0-colon.zsh │ │ │ │ │ │ │ ├── arithmetic-evaluation.zsh │ │ │ │ │ │ │ ├── assign-append.zsh │ │ │ │ │ │ │ ├── assign-argv.zsh │ │ │ │ │ │ │ ├── assign-array.zsh │ │ │ │ │ │ │ ├── assign-array2.zsh │ │ │ │ │ │ │ ├── assign-array3.zsh │ │ │ │ │ │ │ ├── assign-semicolon.zsh │ │ │ │ │ │ │ ├── assign-subshell.zsh │ │ │ │ │ │ │ ├── assign.zsh │ │ │ │ │ │ │ ├── back-quoted-argument.zsh │ │ │ │ │ │ │ ├── backslash-continuation.zsh │ │ │ │ │ │ │ ├── braces1.zsh │ │ │ │ │ │ │ ├── braces2.zsh │ │ │ │ │ │ │ ├── brackets-mismatch1.zsh │ │ │ │ │ │ │ ├── brackets-mismatch10-if-negative.zsh │ │ │ │ │ │ │ ├── brackets-mismatch2.zsh │ │ │ │ │ │ │ ├── brackets-mismatch3.zsh │ │ │ │ │ │ │ ├── brackets-mismatch4.zsh │ │ │ │ │ │ │ ├── brackets-mismatch5.zsh │ │ │ │ │ │ │ ├── brackets-mismatch6.zsh │ │ │ │ │ │ │ ├── brackets-mismatch7.zsh │ │ │ │ │ │ │ ├── brackets-mismatch8-if-positive.zsh │ │ │ │ │ │ │ ├── brackets-mismatch8.zsh │ │ │ │ │ │ │ ├── brackets-mismatch9-if-positive.zsh │ │ │ │ │ │ │ ├── commandseparator.zsh │ │ │ │ │ │ │ ├── comment-followed.zsh │ │ │ │ │ │ │ ├── comment-leading.zsh │ │ │ │ │ │ │ ├── comment-off.zsh │ │ │ │ │ │ │ ├── comments.zsh │ │ │ │ │ │ │ ├── commmand-parameter.zsh │ │ │ │ │ │ │ ├── control-flow.zsh │ │ │ │ │ │ │ ├── control-flow2.zsh │ │ │ │ │ │ │ ├── control-flow3.zsh │ │ │ │ │ │ │ ├── dollar-dollar.zsh │ │ │ │ │ │ │ ├── dollar-noise.zsh │ │ │ │ │ │ │ ├── dollar-paren.zsh │ │ │ │ │ │ │ ├── dollar-quoted.zsh │ │ │ │ │ │ │ ├── dollar-quoted2.zsh │ │ │ │ │ │ │ ├── dollar-quoted3.zsh │ │ │ │ │ │ │ ├── double-hyphen-option.zsh │ │ │ │ │ │ │ ├── double-quoted.zsh │ │ │ │ │ │ │ ├── double-quoted2.zsh │ │ │ │ │ │ │ ├── double-quoted3.zsh │ │ │ │ │ │ │ ├── double-quoted4.zsh │ │ │ │ │ │ │ ├── empty-command.zsh │ │ │ │ │ │ │ ├── empty-command2.zsh │ │ │ │ │ │ │ ├── exec-redirection1.zsh │ │ │ │ │ │ │ ├── function-named1.zsh │ │ │ │ │ │ │ ├── function-named2.zsh │ │ │ │ │ │ │ ├── function.zsh │ │ │ │ │ │ │ ├── glob.zsh │ │ │ │ │ │ │ ├── hashed-command.zsh │ │ │ │ │ │ │ ├── history-double-quoted-escaped.zsh │ │ │ │ │ │ │ ├── history-double-quoted-no.zsh │ │ │ │ │ │ │ ├── history-double-quoted-unescaped.zsh │ │ │ │ │ │ │ ├── history-double-quoted-yes.zsh │ │ │ │ │ │ │ ├── history-expansion.zsh │ │ │ │ │ │ │ ├── history-expansion2.zsh │ │ │ │ │ │ │ ├── inheritance.zsh │ │ │ │ │ │ │ ├── multiline-array-assignment1.zsh │ │ │ │ │ │ │ ├── multiline-string.zsh │ │ │ │ │ │ │ ├── multiline-string2.zsh │ │ │ │ │ │ │ ├── multiple-redirections.zsh │ │ │ │ │ │ │ ├── noglob-alias.zsh │ │ │ │ │ │ │ ├── noglob1.zsh │ │ │ │ │ │ │ ├── noglob2.zsh │ │ │ │ │ │ │ ├── off-by-one.zsh │ │ │ │ │ │ │ ├── option-path_dirs.zsh │ │ │ │ │ │ │ ├── parameter-star.zsh │ │ │ │ │ │ │ ├── path-broken-symlink.zsh │ │ │ │ │ │ │ ├── path-dollared-word2.zsh │ │ │ │ │ │ │ ├── path-separators.zsh │ │ │ │ │ │ │ ├── path-separators2.zsh │ │ │ │ │ │ │ ├── path-space.zsh │ │ │ │ │ │ │ ├── path-tilde-home.zsh │ │ │ │ │ │ │ ├── path-tilde-home2.zsh │ │ │ │ │ │ │ ├── path-tilde-named.zsh │ │ │ │ │ │ │ ├── path.zsh │ │ │ │ │ │ │ ├── path_prefix.zsh │ │ │ │ │ │ │ ├── path_prefix2.zsh │ │ │ │ │ │ │ ├── precommand.zsh │ │ │ │ │ │ │ ├── precommand2.zsh │ │ │ │ │ │ │ ├── prefix-redirection.zsh │ │ │ │ │ │ │ ├── redirection.zsh │ │ │ │ │ │ │ ├── redirection2.zsh │ │ │ │ │ │ │ ├── reserved-word.zsh │ │ │ │ │ │ │ ├── simple-command.zsh │ │ │ │ │ │ │ ├── simple-redirection.zsh │ │ │ │ │ │ │ ├── subshell.zsh │ │ │ │ │ │ │ ├── sudo-command.zsh │ │ │ │ │ │ │ ├── sudo-comment.zsh │ │ │ │ │ │ │ ├── sudo-redirection.zsh │ │ │ │ │ │ │ ├── sudo-redirection2.zsh │ │ │ │ │ │ │ ├── sudo-redirection3.zsh │ │ │ │ │ │ │ ├── tilde-command-word.zsh │ │ │ │ │ │ │ ├── unbackslash.zsh │ │ │ │ │ │ │ ├── unknown-command.zsh │ │ │ │ │ │ │ ├── vanilla-newline.zsh │ │ │ │ │ │ │ └── vi-linewise-mode.zsh │ │ │ │ │ ├── pattern │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── pattern-highlighter.zsh │ │ │ │ │ │ └── test-data │ │ │ │ │ │ │ └── rm-rf.zsh │ │ │ │ │ └── root │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── root-highlighter.zsh │ │ │ │ ├── images │ │ │ │ │ ├── after1-smaller.png │ │ │ │ │ ├── after1.png │ │ │ │ │ ├── after2-smaller.png │ │ │ │ │ ├── after2.png │ │ │ │ │ ├── after3-smaller.png │ │ │ │ │ ├── after3.png │ │ │ │ │ ├── before1-smaller.png │ │ │ │ │ ├── before1.png │ │ │ │ │ ├── before2-smaller.png │ │ │ │ │ ├── before2.png │ │ │ │ │ ├── before3-smaller.png │ │ │ │ │ ├── before3.png │ │ │ │ │ ├── preview-smaller.png │ │ │ │ │ └── preview.png │ │ │ │ ├── release.md │ │ │ │ ├── tests │ │ │ │ │ ├── README.md │ │ │ │ │ ├── generate.zsh │ │ │ │ │ ├── tap-colorizer.zsh │ │ │ │ │ ├── tap-filter │ │ │ │ │ ├── test-highlighting.zsh │ │ │ │ │ └── test-perfs.zsh │ │ │ │ ├── zsh-syntax-highlighting.plugin.zsh │ │ │ │ └── zsh-syntax-highlighting.zsh │ │ │ └── init.zsh │ │ ├── terminal │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── tmux │ │ │ ├── README.md │ │ │ └── init.zsh │ │ ├── utility │ │ │ ├── README.md │ │ │ ├── functions │ │ │ │ ├── _cdls_popdls_pushdls │ │ │ │ ├── _dut │ │ │ │ ├── _mkdcd │ │ │ │ ├── _noremoteglob │ │ │ │ ├── _prep │ │ │ │ ├── _psub │ │ │ │ ├── diff │ │ │ │ ├── dut │ │ │ │ ├── make │ │ │ │ ├── prep │ │ │ │ ├── psub │ │ │ │ ├── wdiff │ │ │ │ └── zsh-help │ │ │ └── init.zsh │ │ ├── wakeonlan │ │ │ ├── README.md │ │ │ └── functions │ │ │ │ ├── _wake │ │ │ │ └── wake │ │ └── yum │ │ │ ├── README.md │ │ │ └── init.zsh │ └── runcoms │ │ ├── README.md │ │ ├── zlogin │ │ ├── zlogout │ │ ├── zpreztorc │ │ ├── zprofile │ │ └── zshenv ├── .zshrc ├── Brewfile ├── bin │ ├── bulk_set_github_actions_secret_for_claud │ ├── cleanup_bcsymbolmap │ ├── mitm │ ├── set_git_user │ └── set_github_actions_secret_for_claud └── xctemplates │ ├── SwiftFile.xctemplate │ ├── TemplateIcon.png │ ├── TemplateIcon@2x.png │ ├── TemplateInfo.plist │ └── ___FILEBASENAME___.swift │ ├── View.xctemplate │ ├── TemplateIcon.png │ ├── TemplateIcon@2x.png │ ├── TemplateInfo.plist │ └── ___FILEBASENAME___.swift │ └── copy_templates.sh └── scripts └── setup ├── fzf.sh ├── prezto.sh └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ~/*.local 3 | *.local 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Castle 2 | bannzai's castle. :japanese_castle: 3 | 4 | # Require 5 | Using [homeshick](https://github.com/andsens/homeshick). 6 | ```bash 7 | $ git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick 8 | ``` 9 | 10 | # Clone :japanese_castle: 11 | ```bash 12 | $ homeshick clone bannzai/castle 13 | ``` 14 | 15 | # Link :japanese_castle: 16 | ```bash 17 | $ homeshick symlink castle 18 | ``` 19 | When you already prepare any `dotfiles` or `rc` and so on. 20 | You get to resolve `--skip` option. 21 | ```bash 22 | $ homeshick symlink castle --skip 23 | ``` 24 | 25 | # Bootstrap 26 | ```bash 27 | $ curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/bannzai/castle/master/bootstrap.sh | bash 28 | ``` 29 | -------------------------------------------------------------------------------- /home/.config/nvim/.netrwhist: -------------------------------------------------------------------------------- 1 | let g:netrw_dirhistmax =10 2 | let g:netrw_dirhist_cnt =1 3 | let g:netrw_dirhist_1='/Users/hiroseyuudai/.config/nvim' 4 | -------------------------------------------------------------------------------- /home/.config/nvim/after/ftplugin.vim: -------------------------------------------------------------------------------- 1 | au FileType * set fo-=c fo-=r fo-=o 2 | -------------------------------------------------------------------------------- /home/.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | set rtp+=~/.fzf 2 | set incsearch 3 | set hlsearch 4 | set expandtab 5 | set tabstop=2 6 | set shiftwidth=2 7 | set noswapfile 8 | set history=10000 9 | filetype on 10 | let g:mapleader = ' ' 11 | 12 | set runtimepath^=~/.vim runtimepath+=~/.vim/after 13 | let &packpath = &runtimepath 14 | source ~/.vimrc 15 | -------------------------------------------------------------------------------- /home/.dlv/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration file for the delve debugger. 2 | 3 | # This is the default configuration file. Available options are provided, but disabled. 4 | # Delete the leading hash mark to enable an item. 5 | 6 | # Provided aliases will be added to the default aliases for a given command. 7 | aliases: 8 | # command: ["alias1", "alias2"] 9 | 10 | # Define sources path substitution rules. Can be used to rewrite a source path stored 11 | # in program's debug information, if the sources were moved to a different place 12 | # between compilation and debugging. 13 | # Note that substitution rules will not be used for paths passed to "break" and "trace" 14 | # commands. 15 | substitute-path: 16 | # - {from: path, to: path} 17 | -------------------------------------------------------------------------------- /home/.editrc: -------------------------------------------------------------------------------- 1 | # https://stackoverflow.com/questions/20363737/mysql-reverse-i-search 2 | # https://mahata.wordpress.com/2016/10/24/mysql-でのコマンド履歴検索/ 3 | mysql:bind '^R' em-inc-search-prev 4 | -------------------------------------------------------------------------------- /home/.gitconfig.bannzai: -------------------------------------------------------------------------------- 1 | [user] 2 | name = bannzai 3 | email = kingkong999yhirose@gmail.com 4 | -------------------------------------------------------------------------------- /home/.gitignore: -------------------------------------------------------------------------------- 1 | # VSCode 2 | .vscode 3 | 4 | # Xcode (from gitignore.io) 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | *.moved-aside 17 | DerivedData 18 | *.hmap 19 | *.ipa 20 | *.xcuserstate 21 | **/*.xcscmblueprint 22 | xcuserdata/ 23 | 24 | # CocoaPod 25 | Pods/* 26 | 27 | # others 28 | *.swp 29 | !.gitkeep 30 | .DS_Store 31 | 32 | # rails 33 | tags 34 | vendor/bundle 35 | 36 | # secret 37 | *.secret 38 | .local 39 | .envrc 40 | -------------------------------------------------------------------------------- /home/.lldbinit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.lldbinit -------------------------------------------------------------------------------- /home/.pryrc: -------------------------------------------------------------------------------- 1 | Pry.commands.alias_command 'c', 'continue' 2 | Pry.commands.alias_command 's', 'step' 3 | Pry.commands.alias_command 'n', 'next' 4 | Pry.commands.alias_command 'f', 'finish' 5 | 6 | -------------------------------------------------------------------------------- /home/.ssh/config: -------------------------------------------------------------------------------- 1 | Host github 2 | HostName github.com 3 | identityFile ~/.ssh/id_rsa 4 | User bannzai 5 | 6 | Host hockam 7 | HostName hockam.com 8 | Port 22 9 | User bannzai 10 | IdentityFile ~/.ssh/id_rsa 11 | 12 | Include ~/.ssh/conf.d/local/config.local 13 | -------------------------------------------------------------------------------- /home/.vim/ftdetect/go.vim: -------------------------------------------------------------------------------- 1 | let g:go_fmt_command = "goimports" 2 | autocmd FileType go nnoremap b :GoBuild 3 | autocmd FileType go nnoremap r :GoRun 4 | autocmd FileType go nnoremap t :GoTest 5 | 6 | nnoremap n :cnext 7 | nnoremap p :cprevious 8 | nnoremap c :cclose 9 | -------------------------------------------------------------------------------- /home/.vim/ftdetect/ruby.vim: -------------------------------------------------------------------------------- 1 | autocmd BufRead,BufNewFile *.rb setfiletype ruby 2 | 3 | let g:syntastic_mode_map = { 'mode': 'passive', 4 | \ 'active_filetypes': ['ruby'] } 5 | let g:syntastic_ruby_checkers = ['rubocop'] 6 | -------------------------------------------------------------------------------- /home/.vim/ftdetect/ts.vim: -------------------------------------------------------------------------------- 1 | setlocal expandtab 2 | setlocal shiftwidth=2 3 | setlocal softtabstop=2 4 | setlocal tabstop=2 5 | setlocal autoindent 6 | 7 | let g:LanguageClient_serverCommands = { 8 | \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], 9 | \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'], 10 | \ 'javascript.jsx': ['tcp://127.0.0.1:2089'], 11 | \ 'python': ['/usr/local/bin/pyls'], 12 | \ } 13 | 14 | " nnoremap :call LanguageClient_contextMenu() 15 | " " Or map each action separately 16 | " nnoremap K :call LanguageClient#textDocument_hover() 17 | " nnoremap gd :call LanguageClient#textDocument_definition() 18 | " nnoremap :call LanguageClient#textDocument_rename() 19 | 20 | " if executable('typescript-language-server') 21 | " au User lsp_setup call lsp#register_server({ 22 | " \ 'name': 'javascript support using typescript-language-server', 23 | " \ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, 24 | " \ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))}, 25 | " \ 'whitelist': ['javascript', 'javascript.jsx'] 26 | " \ }) 27 | " endif 28 | -------------------------------------------------------------------------------- /home/.zprezto/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | end_of_line = lf 3 | insert_final_newline = true 4 | indent_style = space 5 | indent_size = 2 6 | trim_trailing_whitespace = true 7 | 8 | [{.gitattributes,.gitignore,.gitmodules}] 9 | indent_style = tab 10 | -------------------------------------------------------------------------------- /home/.zprezto/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### Description 4 | 5 | 6 | ### Expected behavior 7 | 8 | 9 | 10 | ### Actual behavior 11 | 12 | 13 | 14 | ### Steps to Reproduce 15 | 16 | 1. [First Step] 17 | 2. [Second Step] 18 | 3. [and so on...] 19 | 20 | ### Versions 21 | 22 | - Prezto commit: 23 | - ZSH version: 24 | - OS information: 25 | -------------------------------------------------------------------------------- /home/.zprezto/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please be sure to check out our [contributing guidelines](https://github.com/sorin-ionescu/prezto/blob/master/CONTRIBUTING.md) 2 | before submitting your pull request. 3 | 4 | Fixes # 5 | 6 | ## Proposed Changes 7 | 8 | - 9 | - 10 | - 11 | -------------------------------------------------------------------------------- /home/.zprezto/.gitignore: -------------------------------------------------------------------------------- 1 | *.zwc 2 | *.zwc.old 3 | modules/*/cache.zsh 4 | contrib 5 | -------------------------------------------------------------------------------- /home/.zprezto/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2011 Robby Russell and contributors 2 | Copyright (c) 2011-2017 Sorin Ionescu and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/archive/functions/_lsarchive: -------------------------------------------------------------------------------- 1 | #compdef lsarchive 2 | #autoload 3 | 4 | # 5 | # Completes lsarchive. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _arguments \ 12 | '(-v --verbose)'{-v,--remove}'[verbose archive listing]' \ 13 | "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|jar|rar|7z)(-.)'" && return 0 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/archive/functions/_unarchive: -------------------------------------------------------------------------------- 1 | #compdef unarchive 2 | #autoload 3 | 4 | # 5 | # Completes unarchive. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _arguments \ 12 | '(-r --remove)'{-r,--remove}'[remove archive]' \ 13 | "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|jar|rar|7z|deb)(-.)'" && return 0 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | indent_style = tab 7 | indent_size = 4 8 | 9 | [*.md] 10 | indent_style = space 11 | 12 | [*.rb] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.yml] 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | --format documentation 4 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/.rubocop.yml: -------------------------------------------------------------------------------- 1 | # Rails: 2 | # Enabled: true 3 | 4 | AllCops: 5 | TargetRubyVersion: 2.3 6 | Include: 7 | - '**/Rakefile' 8 | - '**/config.ru' 9 | - '**/Gemfile' 10 | 11 | Metrics/LineLength: 12 | Max: 120 13 | 14 | Style/Documentation: 15 | Enabled: false 16 | 17 | Style/DotPosition: 18 | EnforcedStyle: trailing 19 | 20 | Style/FrozenStringLiteralComment: 21 | Enabled: false 22 | 23 | Style/Lambda: 24 | Enabled: false 25 | 26 | Style/MultilineMethodCallIndentation: 27 | EnforcedStyle: indented 28 | 29 | Style/TrailingUnderscoreVariable: 30 | Enabled: false 31 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.3.1 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Fish-like fast/unobtrusive autosuggestions for zsh. 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rspec' 4 | gem 'rspec-wait' 5 | gem 'pry-byebug' 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | byebug (9.0.5) 5 | coderay (1.1.1) 6 | diff-lcs (1.3) 7 | method_source (0.8.2) 8 | pry (0.10.4) 9 | coderay (~> 1.1.0) 10 | method_source (~> 0.8.1) 11 | slop (~> 3.4) 12 | pry-byebug (3.4.0) 13 | byebug (~> 9.0) 14 | pry (~> 0.10) 15 | rspec (3.5.0) 16 | rspec-core (~> 3.5.0) 17 | rspec-expectations (~> 3.5.0) 18 | rspec-mocks (~> 3.5.0) 19 | rspec-core (3.5.4) 20 | rspec-support (~> 3.5.0) 21 | rspec-expectations (3.5.0) 22 | diff-lcs (>= 1.2.0, < 2.0) 23 | rspec-support (~> 3.5.0) 24 | rspec-mocks (3.5.0) 25 | diff-lcs (>= 1.2.0, < 2.0) 26 | rspec-support (~> 3.5.0) 27 | rspec-support (3.5.0) 28 | rspec-wait (0.0.9) 29 | rspec (>= 3, < 4) 30 | slop (3.6.0) 31 | 32 | PLATFORMS 33 | ruby 34 | 35 | DEPENDENCIES 36 | pry-byebug 37 | rspec 38 | rspec-wait 39 | 40 | BUNDLED WITH 41 | 1.13.6 42 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Thiago de Arruda 2 | Copyright (c) 2016-2017 Eric Freese 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/Makefile: -------------------------------------------------------------------------------- 1 | SRC_DIR := ./src 2 | 3 | SRC_FILES := \ 4 | $(SRC_DIR)/setup.zsh \ 5 | $(SRC_DIR)/config.zsh \ 6 | $(SRC_DIR)/util.zsh \ 7 | $(SRC_DIR)/features.zsh \ 8 | $(SRC_DIR)/bind.zsh \ 9 | $(SRC_DIR)/highlight.zsh \ 10 | $(SRC_DIR)/widgets.zsh \ 11 | $(SRC_DIR)/strategies/*.zsh \ 12 | $(SRC_DIR)/async.zsh \ 13 | $(SRC_DIR)/start.zsh 14 | 15 | HEADER_FILES := \ 16 | DESCRIPTION \ 17 | URL \ 18 | VERSION \ 19 | LICENSE 20 | 21 | PLUGIN_TARGET := zsh-autosuggestions.zsh 22 | 23 | all: $(PLUGIN_TARGET) 24 | 25 | $(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES) 26 | cat $(HEADER_FILES) | sed -e 's/^/# /g' > $@ 27 | cat $(SRC_FILES) >> $@ 28 | 29 | .PHONY: clean 30 | clean: 31 | rm $(PLUGIN_TARGET) 32 | 33 | .PHONY: test 34 | test: all 35 | @test -n "$$TEST_ZSH_BIN" && echo "Testing zsh binary: $(TEST_ZSH_BIN)" || true 36 | bundle exec rspec $(TESTS) 37 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/URL: -------------------------------------------------------------------------------- 1 | https://github.com/zsh-users/zsh-autosuggestions 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/VERSION: -------------------------------------------------------------------------------- 1 | v0.4.2 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | environment: 3 | ZSH_VERSIONS: zsh-dev/4.3.11 zsh/5.0.2 zsh/5.0.8 zsh/5.1.1 zsh/5.2 zsh/5.3.1 zsh/5.4.2 4 | 5 | dependencies: 6 | pre: 7 | - for v in $(echo $ZSH_VERSIONS | awk "{ for (i=$((1+CIRCLE_NODE_INDEX));i<=NF;i+=$CIRCLE_NODE_TOTAL) print \$i }"); do wget https://sourceforge.net/projects/zsh/files/$v/zsh-${v#*/}.tar.gz && tar xzf zsh-${v#*/}.tar.gz && pushd zsh-${v#*/} && ./configure && sudo make install && popd || exit 1; done 8 | 9 | test: 10 | override: 11 | - for v in $(echo $ZSH_VERSIONS | awk "{ for (i=$((1+CIRCLE_NODE_INDEX));i<=NF;i+=$CIRCLE_NODE_TOTAL) print \$i }"); do TEST_ZSH_BIN=/usr/local/bin/zsh-${v#*/} make test || exit 1; done: 12 | parallel: true 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/integrations/bracketed_paste_magic_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'pasting using bracketed-paste-magic' do 2 | let(:before_sourcing) do 3 | -> do 4 | session. 5 | run_command('autoload -Uz bracketed-paste-magic'). 6 | run_command('zle -N bracketed-paste bracketed-paste-magic') 7 | end 8 | end 9 | 10 | context 'with suggestions disabled while pasting' do 11 | before do 12 | session. 13 | run_command('bpm_init() { zle autosuggest-disable }'). 14 | run_command('bpm_finish() { zle autosuggest-enable }'). 15 | run_command('zstyle :bracketed-paste-magic paste-init bpm_init'). 16 | run_command('zstyle :bracketed-paste-magic paste-finish bpm_finish') 17 | end 18 | 19 | it 'does not show an incorrect suggestion' do 20 | with_history('echo hello') do 21 | session.paste_string("echo #{'a' * 60}") 22 | sleep 1 23 | expect(session.content).to eq("echo #{'a' * 60}") 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/integrations/client_zpty_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a running zpty command' do 2 | let(:before_sourcing) { -> { session.run_command('zmodload zsh/zpty && zpty -b kitty cat') } } 3 | 4 | it 'is not affected by running zsh-autosuggestions' do 5 | sleep 1 # Give a little time for precmd hooks to run 6 | session.run_command('zpty -t kitty; echo $?') 7 | 8 | wait_for { session.content }.to end_with("\n0") 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/integrations/rebound_bracket_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'rebinding [' do 2 | context 'initialized before sourcing the plugin' do 3 | before do 4 | session.run_command("function [ { $commands[\\[] \"$@\" }") 5 | session.clear_screen 6 | end 7 | 8 | it 'executes the custom behavior and the built-in behavior' do 9 | session.send_string('asdf') 10 | wait_for { session.content }.to eq('asdf') 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/integrations/zle_input_stack_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'using `zle -U`' do 2 | let(:before_sourcing) do 3 | -> do 4 | session. 5 | run_command('_zsh_autosuggest_strategy_test() { sleep 1; _zsh_autosuggest_strategy_default "$1" }'). 6 | run_command('foo() { zle -U - "echo hello" }; zle -N foo; bindkey ^B foo') 7 | end 8 | end 9 | 10 | let(:options) { ['unset ZSH_AUTOSUGGEST_USE_ASYNC', 'ZSH_AUTOSUGGEST_STRATEGY=test'] } 11 | 12 | # TODO: This is only possible with the $KEYS_QUEUED_COUNT widget parameter, coming soon... 13 | xit 'does not fetch a suggestion for every inserted character' do 14 | session.send_keys('C-b') 15 | wait_for { session.content }.to eq('echo hello') 16 | end 17 | 18 | it 'shows a suggestion when the widget completes' do 19 | with_history('echo hello world') do 20 | session.send_keys('C-b') 21 | wait_for { session.content(esc_seqs: true) }.to match(/\Aecho hello\e\[[0-9]+m world/) 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/multi_line_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a multi-line suggestion' do 2 | it 'should be displayed on multiple lines' do 3 | with_history(-> { 4 | session.send_string('echo "') 5 | session.send_keys('enter') 6 | session.send_string('"') 7 | session.send_keys('enter') 8 | }) do 9 | session.send_keys('e') 10 | wait_for { session.content }.to eq("echo \"\n\"") 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/async_zpty_name_spec.rb: -------------------------------------------------------------------------------- 1 | context 'when async suggestions are enabled' do 2 | let(:options) { ["ZSH_AUTOSUGGEST_USE_ASYNC="] } 3 | 4 | describe 'the zpty for async suggestions' do 5 | it 'is created with the default name' do 6 | session.run_command('zpty -t zsh_autosuggest_pty &>/dev/null; echo $?') 7 | wait_for { session.content }.to end_with("\n0") 8 | end 9 | 10 | context 'when ZSH_AUTOSUGGEST_ASYNC_PTY_NAME is set' do 11 | let(:options) { super() + ['ZSH_AUTOSUGGEST_ASYNC_PTY_NAME=foo_pty'] } 12 | 13 | it 'is created with the specified name' do 14 | session.run_command('zpty -t foo_pty &>/dev/null; echo $?') 15 | wait_for { session.content }.to end_with("\n0") 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/buffer_max_size_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a suggestion' do 2 | let(:term_opts) { { width: 200 } } 3 | let(:long_command) { "echo #{'a' * 100}" } 4 | 5 | around do |example| 6 | with_history(long_command) { example.run } 7 | end 8 | 9 | it 'is provided for any buffer length' do 10 | session.send_string(long_command[0...-1]) 11 | wait_for { session.content }.to eq(long_command) 12 | end 13 | 14 | context 'when ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE is specified' do 15 | let(:buffer_max_size) { 10 } 16 | let(:options) { ["ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=#{buffer_max_size}"] } 17 | 18 | it 'is provided when the buffer is shorter than the specified length' do 19 | session.send_string(long_command[0...(buffer_max_size - 1)]) 20 | wait_for { session.content }.to eq(long_command) 21 | end 22 | 23 | it 'is provided when the buffer is equal to the specified length' do 24 | session.send_string(long_command[0...(buffer_max_size)]) 25 | wait_for { session.content }.to eq(long_command) 26 | end 27 | 28 | it 'is not provided when the buffer is longer than the specified length' 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/highlight_style_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a displayed suggestion' do 2 | it 'is shown in the default style' 3 | 4 | describe 'when ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE is set to a zle_highlight string' do 5 | it 'is shown in the specified style' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/original_widget_prefix_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'an original zle widget' do 2 | context 'is accessible with the default prefix' 3 | 4 | context 'when ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX is set' do 5 | it 'is accessible with the specified prefix' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/strategy_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a suggestion for a given prefix' do 2 | let(:options) { ['_zsh_autosuggest_strategy_default() { suggestion="echo foo" }'] } 3 | 4 | it 'is determined by calling the default strategy function' do 5 | session.send_string('e') 6 | wait_for { session.content }.to eq('echo foo') 7 | end 8 | 9 | context 'when ZSH_AUTOSUGGEST_STRATEGY is set' do 10 | let(:options) { [ 11 | '_zsh_autosuggest_strategy_custom() { suggestion="echo foo" }', 12 | 'ZSH_AUTOSUGGEST_STRATEGY=custom' 13 | ] } 14 | 15 | it 'is determined by calling the specified strategy function' do 16 | session.send_string('e') 17 | wait_for { session.content }.to eq('echo foo') 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/options/use_async_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'suggestion fetching' do 2 | it 'is performed synchronously' 3 | 4 | context 'when ZSH_AUTOSUGGEST_USE_ASYNC is set' do 5 | it 'is performed asynchronously' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'pry' 2 | require 'rspec/wait' 3 | require 'terminal_session' 4 | 5 | RSpec.shared_context 'terminal session' do 6 | let(:term_opts) { {} } 7 | let(:session) { TerminalSession.new(term_opts) } 8 | let(:before_sourcing) { -> {} } 9 | let(:options) { [] } 10 | 11 | around do |example| 12 | before_sourcing.call 13 | 14 | session.run_command((['source zsh-autosuggestions.zsh'] + options).join('; ')) 15 | session.clear_screen 16 | 17 | example.run 18 | 19 | session.destroy 20 | end 21 | 22 | def with_history(*commands, &block) 23 | session.run_command('fc -p') 24 | 25 | commands.each do |c| 26 | c.respond_to?(:call) ? c.call : session.run_command(c) 27 | end 28 | 29 | session.clear_screen 30 | 31 | yield block 32 | 33 | session.send_keys('C-c') 34 | session.run_command('fc -P') 35 | end 36 | end 37 | 38 | RSpec.configure do |config| 39 | config.expect_with :rspec do |expectations| 40 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true 41 | end 42 | 43 | config.mock_with :rspec do |mocks| 44 | mocks.verify_partial_doubles = true 45 | end 46 | 47 | config.wait_timeout = 2 48 | 49 | config.include_context 'terminal session' 50 | end 51 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/strategies/default_spec.rb: -------------------------------------------------------------------------------- 1 | require 'strategies/special_characters_helper' 2 | 3 | describe 'the default suggestion strategy' do 4 | it 'suggests the last matching history entry' do 5 | with_history('ls foo', 'ls bar', 'echo baz') do 6 | session.send_string('ls') 7 | wait_for { session.content }.to eq('ls bar') 8 | end 9 | end 10 | 11 | include_examples 'special characters' 12 | end 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/strategies/match_prev_cmd_spec.rb: -------------------------------------------------------------------------------- 1 | require 'strategies/special_characters_helper' 2 | 3 | describe 'the match_prev_cmd strategy' do 4 | let(:options) { ['ZSH_AUTOSUGGEST_STRATEGY=match_prev_cmd'] } 5 | 6 | it 'suggests the last matching history entry after the previous command' do 7 | with_history( 8 | 'echo what', 9 | 'ls foo', 10 | 'echo what', 11 | 'ls bar', 12 | 'ls baz', 13 | 'echo what' 14 | ) do 15 | session.send_string('ls') 16 | wait_for { session.content }.to eq('ls bar') 17 | end 18 | end 19 | 20 | include_examples 'special characters' 21 | end 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/widgets/disable_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-disable` widget' do 2 | before do 3 | session.run_command('bindkey ^B autosuggest-disable') 4 | end 5 | 6 | it 'disables suggestions and clears the suggestion' do 7 | with_history('echo hello') do 8 | session.send_string('echo') 9 | wait_for { session.content }.to eq('echo hello') 10 | 11 | session.send_keys('C-b') 12 | wait_for { session.content }.to eq('echo') 13 | 14 | session.send_string(' h') 15 | sleep 1 16 | expect(session.content).to eq('echo h') 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/widgets/enable_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-enable` widget' do 2 | before do 3 | session. 4 | run_command('typeset -g _ZSH_AUTOSUGGEST_DISABLED'). 5 | run_command('bindkey ^B autosuggest-enable') 6 | end 7 | 8 | it 'enables suggestions and fetches a suggestion' do 9 | with_history('echo hello') do 10 | session.send_string('e') 11 | sleep 1 12 | expect(session.content).to eq('e') 13 | 14 | session.send_keys('C-b') 15 | session.send_string('c') 16 | wait_for { session.content }.to eq('echo hello') 17 | end 18 | end 19 | 20 | context 'invoked on an empty buffer' do 21 | it 'does not fetch a suggestion' do 22 | with_history('echo hello') do 23 | session.send_keys('C-b') 24 | sleep 1 25 | expect(session.content).to eq('') 26 | end 27 | end 28 | end 29 | 30 | context 'invoked on a non-empty buffer' do 31 | it 'fetches a suggestion' do 32 | with_history('echo hello') do 33 | session.send_string('e') 34 | sleep 1 35 | expect(session.content).to eq('e') 36 | 37 | session.send_keys('C-b') 38 | wait_for { session.content }.to eq('echo hello') 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/widgets/fetch_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-fetch` widget' do 2 | context 'when suggestions are disabled' do 3 | before do 4 | session. 5 | run_command('bindkey ^B autosuggest-disable'). 6 | run_command('bindkey ^F autosuggest-fetch'). 7 | send_keys('C-b') 8 | end 9 | 10 | it 'will fetch and display a suggestion' do 11 | with_history('echo hello') do 12 | session.send_string('echo h') 13 | sleep 1 14 | expect(session.content).to eq('echo h') 15 | 16 | session.send_keys('C-f') 17 | wait_for { session.content }.to eq('echo hello') 18 | 19 | session.send_string('e') 20 | wait_for { session.content }.to eq('echo hello') 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/spec/widgets/toggle_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-toggle` widget' do 2 | before do 3 | session.run_command('bindkey ^B autosuggest-toggle') 4 | end 5 | 6 | it 'toggles suggestions' do 7 | with_history('echo world', 'echo hello') do 8 | session.send_string('echo') 9 | wait_for { session.content }.to eq('echo hello') 10 | 11 | session.send_keys('C-b') 12 | wait_for { session.content }.to eq('echo') 13 | 14 | session.send_string(' h') 15 | sleep 1 16 | expect(session.content).to eq('echo h') 17 | 18 | session.send_keys('C-b') 19 | wait_for { session.content }.to eq('echo hello') 20 | 21 | session.send_keys('C-h') 22 | session.send_string('w') 23 | wait_for { session.content }.to eq('echo world') 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/features.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Feature Detection # 4 | #--------------------------------------------------------------------# 5 | 6 | _zsh_autosuggest_feature_detect_zpty_returns_fd() { 7 | typeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD 8 | typeset -h REPLY 9 | 10 | zpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }' 11 | 12 | if (( REPLY )); then 13 | _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1 14 | else 15 | _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0 16 | fi 17 | 18 | zpty -d zsh_autosuggest_feature_detect 19 | } 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/highlight.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Highlighting # 4 | #--------------------------------------------------------------------# 5 | 6 | # If there was a highlight, remove it 7 | _zsh_autosuggest_highlight_reset() { 8 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 9 | 10 | if [[ -n "$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT" ]]; then 11 | region_highlight=("${(@)region_highlight:#$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT}") 12 | unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 13 | fi 14 | } 15 | 16 | # If there's a suggestion, highlight it 17 | _zsh_autosuggest_highlight_apply() { 18 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 19 | 20 | if (( $#POSTDISPLAY )); then 21 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" 22 | region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT") 23 | else 24 | unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 25 | fi 26 | } 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/setup.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Setup # 4 | #--------------------------------------------------------------------# 5 | 6 | # Precmd hooks for initializing the library and starting pty's 7 | autoload -Uz add-zsh-hook 8 | 9 | # Asynchronous suggestions are generated in a pty 10 | zmodload zsh/zpty 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/start.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Start # 4 | #--------------------------------------------------------------------# 5 | 6 | # Start the autosuggestion widgets 7 | _zsh_autosuggest_start() { 8 | add-zsh-hook -d precmd _zsh_autosuggest_start 9 | 10 | _zsh_autosuggest_bind_widgets 11 | 12 | # Re-bind widgets on every precmd to ensure we wrap other wrappers. 13 | # Specifically, highlighting breaks if our widgets are wrapped by 14 | # zsh-syntax-highlighting widgets. This also allows modifications 15 | # to the widget list variables to take effect on the next precmd. 16 | add-zsh-hook precmd _zsh_autosuggest_bind_widgets 17 | 18 | if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then 19 | _zsh_autosuggest_async_start 20 | fi 21 | } 22 | 23 | # Start the autosuggestion widgets on the next precmd 24 | add-zsh-hook precmd _zsh_autosuggest_start 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/strategies/default.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Default Suggestion Strategy # 4 | #--------------------------------------------------------------------# 5 | # Suggests the most recent history item that matches the given 6 | # prefix. 7 | # 8 | 9 | _zsh_autosuggest_strategy_default() { 10 | # Reset options to defaults and enable LOCAL_OPTIONS 11 | emulate -L zsh 12 | 13 | # Enable globbing flags so that we can use (#m) 14 | setopt EXTENDED_GLOB 15 | 16 | # Escape backslashes and all of the glob operators so we can use 17 | # this string as a pattern to search the $history associative array. 18 | # - (#m) globbing flag enables setting references for match data 19 | # TODO: Use (b) flag when we can drop support for zsh older than v5.0.8 20 | local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" 21 | 22 | # Get the history items that match 23 | # - (r) subscript flag makes the pattern match on values 24 | typeset -g suggestion="${history[(r)${prefix}*]}" 25 | } 26 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/src/util.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Utility Functions # 4 | #--------------------------------------------------------------------# 5 | 6 | _zsh_autosuggest_escape_command() { 7 | setopt localoptions EXTENDED_GLOB 8 | 9 | # Escape special chars in the string (requires EXTENDED_GLOB) 10 | echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" 11 | } 12 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/external/zsh-autosuggestions.plugin.zsh: -------------------------------------------------------------------------------- 1 | source ${0:A:h}/zsh-autosuggestions.zsh 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/autosuggestions/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Integrates zsh-autosuggestions into Prezto. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Load dependencies. 9 | pmodload 'editor' 10 | 11 | # Source module files. 12 | source "${0:h}/external/zsh-autosuggestions.zsh" || return 1 13 | 14 | # 15 | # Highlighting 16 | # 17 | 18 | # Set highlight color, default 'fg=8'. 19 | zstyle -s ':prezto:module:autosuggestions:color' found \ 20 | 'ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE' || ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8' 21 | 22 | # Disable highlighting. 23 | if ! zstyle -t ':prezto:module:autosuggestions' color; then 24 | ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='' 25 | fi 26 | 27 | # 28 | # Key Bindings 29 | # 30 | 31 | if [[ -n "$key_info" ]]; then 32 | # vi 33 | bindkey -M viins "$key_info[Control]F" vi-forward-word 34 | bindkey -M viins "$key_info[Control]E" vi-add-eol 35 | fi 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/command-not-found/README.md: -------------------------------------------------------------------------------- 1 | Command-Not-Found 2 | ================= 3 | 4 | When you try to use a command that is not available locally, searches 5 | the package manager for a package offering that command and suggests 6 | the proper install command. 7 | 8 | Debian-based and Arch Linux-based distributions use the [`command-not-found`][1] tool. 9 | 10 | macOS uses Homebrew's [`command-not-found` clone][2]. Note that you also need to [follow the instructions to tap the `command-not-found` homebrew repository][3]. 11 | 12 | 13 | Authors 14 | ------- 15 | 16 | *The authors of this module should be contacted via the [issue tracker][4].* 17 | 18 | - [Joseph Booker](https://github.com/sargas) 19 | 20 | [1]: https://code.launchpad.net/command-not-found 21 | [2]: https://github.com/Homebrew/homebrew-command-not-found 22 | [3]: https://github.com/Homebrew/homebrew-command-not-found#install 23 | [4]: https://github.com/sorin-ionescu/prezto/issues 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/command-not-found/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Displays installation information for not found commands. 3 | # 4 | # Authors: 5 | # Joseph Jon Booker 6 | # Indrajit Raychaudhuri 7 | # 8 | 9 | # Load command-not-found on Debian-based distributions. 10 | if [[ -s '/etc/zsh_command_not_found' ]]; then 11 | source '/etc/zsh_command_not_found' 12 | # Load command-not-found on Arch Linux-based distributions. 13 | elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then 14 | source '/usr/share/doc/pkgfile/command-not-found.zsh' 15 | # Load command-not-found on macOS when homebrew tap is configured. 16 | elif [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then 17 | source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' 18 | # Return if requirements are not found. 19 | else 20 | return 1 21 | fi 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/completion/README.md: -------------------------------------------------------------------------------- 1 | Completion 2 | ========== 3 | 4 | Loads and configures tab completion and provides additional completions from 5 | the [zsh-completions][1] project. 6 | 7 | This module must be loaded **after** the *utility* module. 8 | 9 | Settings 10 | -------- 11 | 12 | ### Ignore */etc/hosts* Entries 13 | 14 | To ignore certain entries from static */etc/hosts* for host completion, add the 15 | following lines in *zpreztorc* with the IP addresses of the hosts as they 16 | appear in */etc/hosts*. Both IP address and the corresponding hostname will be 17 | ignored during host completion. However, some of the entries ignored from 18 | */etc/hosts* still might appear during completion because of their presence in 19 | *ssh* configuration or history). 20 | 21 | ```sh 22 | zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \ 23 | '0.0.0.0' '127.0.0.1' 24 | ``` 25 | 26 | Contributors 27 | ------------ 28 | 29 | Completions should be submitted to the [zsh-completions][1] project according 30 | to its rules and regulations. This module will be synchronized against it. 31 | 32 | Authors 33 | ------- 34 | 35 | *The authors of this module should be contacted via the [issue tracker][2].* 36 | 37 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 38 | 39 | [1]: https://github.com/zsh-users/zsh-completions 40 | [2]: https://github.com/sorin-ionescu/prezto/issues 41 | -------------------------------------------------------------------------------- /home/.zprezto/modules/completion/external/.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://EditorConfig.org 3 | 4 | root = true 5 | 6 | [_*] 7 | indent_style = space 8 | indent_size = 2 9 | tab_width = 2 10 | end_of_line = LF 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/completion/external/.gitignore: -------------------------------------------------------------------------------- 1 | # zsh word code files 2 | *.zwc 3 | 4 | -------------------------------------------------------------------------------- /home/.zprezto/modules/completion/external/zsh-completions.plugin.zsh: -------------------------------------------------------------------------------- 1 | fpath+="${0:h}/src" 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/directory/README.md: -------------------------------------------------------------------------------- 1 | Directory 2 | ========= 3 | 4 | Sets directory options and defines directory aliases. 5 | 6 | Options 7 | ------- 8 | 9 | - `AUTO_CD` auto changes to a directory without typing `cd`. 10 | - `AUTO_PUSHD` pushes the old directory onto the stack on `cd`. 11 | - `PUSHD_IGNORE_DUPS` does not store duplicates in the stack. 12 | - `PUSHD_SILENT` does not print the directory stack after `pushd` or `popd`. 13 | - `PUSHD_TO_HOME` pushes to the home directory when no argument is given. 14 | - `CDABLE_VARS` changes directory to a path stored in a variable. 15 | - `AUTO_NAME_DIRS` auto adds variable-stored paths to `~` list. 16 | - `MULTIOS` writes to multiple descriptors. 17 | - `EXTENDED_GLOB` uses extended globbing syntax. 18 | - `CLOBBER` does not overwrite existing files with `>` and `>>`. Use `>!` and 19 | `>>!` to bypass. 20 | 21 | Aliases 22 | ------- 23 | 24 | - `d` prints the contents of the directory stack. 25 | - `1 ... 9` changes the directory to the **n** previous one. 26 | 27 | Authors 28 | ------- 29 | 30 | *The authors of this module should be contacted via the [issue tracker][1].* 31 | 32 | - [James Cox](https://github.com/imajes) 33 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 34 | 35 | [1]: https://github.com/sorin-ionescu/prezto/issues 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/directory/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Sets directory options and defines directory aliases. 3 | # 4 | # Authors: 5 | # James Cox 6 | # Sorin Ionescu 7 | # 8 | 9 | # 10 | # Options 11 | # 12 | 13 | setopt AUTO_CD # Auto changes to a directory without typing cd. 14 | setopt AUTO_PUSHD # Push the old directory onto the stack on cd. 15 | setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack. 16 | setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd. 17 | setopt PUSHD_TO_HOME # Push to home directory when no argument is given. 18 | setopt CDABLE_VARS # Change directory to a path stored in a variable. 19 | setopt MULTIOS # Write to multiple descriptors. 20 | setopt EXTENDED_GLOB # Use extended globbing syntax. 21 | unsetopt CLOBBER # Do not overwrite existing files with > and >>. 22 | # Use >! and >>! to bypass. 23 | 24 | # 25 | # Aliases 26 | # 27 | 28 | alias d='dirs -v' 29 | for index ({1..9}) alias "$index"="cd +${index}"; unset index 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/dnf/README.md: -------------------------------------------------------------------------------- 1 | DNF 2 | === 3 | 4 | Defines [dnf][1] aliases. 5 | 6 | Aliases 7 | ------- 8 | 9 | - `dnfc` removes package(s) and leaves. 10 | - `dnfi` installs package(s). 11 | - `dnfh` displays history. 12 | - `dnfl` lists packages. 13 | - `dnfL` lists installed packages. 14 | - `dnfq` displays package information. 15 | - `dnfr` removes package(s). 16 | - `dnfs` searches for a package. 17 | - `dnfu` updates packages. 18 | - `dnfU` upgrades packages. 19 | 20 | Authors 21 | ------- 22 | 23 | *The authors of this module should be contacted via the [issue tracker][2].* 24 | 25 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 26 | 27 | [1]: https://fedoraproject.org/wiki/Features/DNF 28 | [2]: https://github.com/sorin-ionescu/prezto/issues 29 | 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/dnf/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines dnf aliases. 3 | # 4 | # Authors: 5 | # FireWave 6 | # Sorin Ionescu 7 | # 8 | 9 | # Return if requirements are not found. 10 | if (( ! $+commands[dnf] )); then 11 | return 1 12 | fi 13 | 14 | # 15 | # Aliases 16 | # 17 | 18 | alias dnfc='sudo dnf clean all' # Cleans the cache. 19 | alias dnfh='dnf history' # Displays history. 20 | alias dnfi='sudo dnf install' # Installs package(s). 21 | alias dnfl='dnf list' # Lists packages. 22 | alias dnfL='dnf list installed' # Lists installed packages. 23 | alias dnfq='dnf info' # Displays package information. 24 | alias dnfr='sudo dnf remove' # Removes package(s). 25 | alias dnfs='dnf search' # Searches for a package. 26 | alias dnfu='sudo dnf update' # Updates packages. 27 | alias dnfU='sudo dnf upgrade' # Upgrades packages. 28 | 29 | -------------------------------------------------------------------------------- /home/.zprezto/modules/docker/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines Docker aliases. 3 | # 4 | # Author: 5 | # François Vantomme 6 | # 7 | 8 | # Return if requirements are not found. 9 | if (( ! $+commands[docker] )); then 10 | return 1 11 | fi 12 | 13 | # 14 | # Functions 15 | # 16 | 17 | # Set Docker Machine environment 18 | function dkme { 19 | if (( ! $+commands[docker-machine] )); then 20 | return 1 21 | fi 22 | 23 | eval $(docker-machine env $1) 24 | } 25 | 26 | # Set Docker Machine default machine 27 | function dkmd { 28 | if (( ! $+commands[docker-machine] )); then 29 | return 1 30 | fi 31 | 32 | pushd ~/.docker/machine/machines 33 | 34 | if [[ ! -d $1 ]]; then 35 | echo "Docker machine '$1' does not exists. Abort." 36 | popd 37 | return 1 38 | fi 39 | 40 | if [[ -L default ]]; then 41 | eval $(rm -f default) 42 | elif [[ -d default ]]; then 43 | echo "A default machine already exists. Abort." 44 | popd 45 | return 1 46 | elif [[ -e default ]]; then 47 | echo "A file named 'default' already exists. Abort." 48 | popd 49 | return 1 50 | fi 51 | 52 | eval $(ln -s $1 default) 53 | popd 54 | } 55 | 56 | # Source module files. 57 | source "${0:h}/alias.zsh" 58 | -------------------------------------------------------------------------------- /home/.zprezto/modules/dpkg/README.md: -------------------------------------------------------------------------------- 1 | Dpkg 2 | ==== 3 | 4 | Defines [dpkg][1] aliases and functions. 5 | 6 | Aliases 7 | ------- 8 | 9 | - `debc` cleans the cache. 10 | - `debf` displays a file's package. 11 | - `debi` installs packages from repositories. 12 | - `debI` installs packages from files. 13 | - `debq` displays package information. 14 | - `debu` updates the package lists. 15 | - `debU` upgrades outdated packages. 16 | - `debx` removes packages. 17 | - `debX` removes packages, their configuration, and unneeded dependencies. 18 | - `debs` searches for packages. 19 | - `deb-build` creates a basic deb package. 20 | - `deb-kclean` removes all kernel images and headers, except for the ones in 21 | use. 22 | 23 | Functions 24 | --------- 25 | 26 | - `deb-clone` generates a script that can be used to duplicate a dpkg-based 27 | system. 28 | - `deb-history` displays dpkg history. 29 | - `deb-kbuild` makes a dpkg Linux kernel package. 30 | 31 | Authors 32 | ------- 33 | 34 | *The authors of this module should be contacted via the [issue tracker][2].* 35 | 36 | - [Daniel Bolton](https://github.com/dbb) 37 | - [Benjamin Boudreau](https://github.com/dreur) 38 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 39 | 40 | [1]: http://wiki.debian.org/Teams/Dpkg 41 | [2]: https://github.com/sorin-ionescu/prezto/issues 42 | -------------------------------------------------------------------------------- /home/.zprezto/modules/dpkg/functions/deb-clone: -------------------------------------------------------------------------------- 1 | # 2 | # Generates a script that can be used to duplicate a dpkg-based system. 3 | # 4 | # Authors: 5 | # Daniel Bolton 6 | # Sorin Ionescu 7 | # 8 | 9 | # function deb-clone { 10 | 11 | local clone_script="${0}.sh" 12 | local package_list=$( 13 | perl \ 14 | -m 'AptPkg::Cache' \ 15 | -e ' 16 | $c=AptPkg::Cache->new; 17 | for (keys %$c) { 18 | push @a, $_ if $c->{$_}->{'CurrentState'} eq 'Installed'; 19 | } 20 | print "$_ " for sort @a; 21 | ' 22 | ) 23 | 24 | rm "$clone_script" 25 | print '#!/bin/sh\n' > "$clone_script" 26 | print "aptitude install ${package_list}\n" >> "$clone_script" 27 | chmod +x "$clone_script" 28 | 29 | # } 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/dpkg/functions/deb-history: -------------------------------------------------------------------------------- 1 | # 2 | # Displays dpkg history. 3 | # 4 | # Authors: 5 | # Peter Leung 6 | # Benjamin Boudreau 7 | # Sorin Ionescu 8 | # 9 | 10 | # function deb-history { 11 | 12 | case "$1" in 13 | (install) 14 | zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*) 15 | ;; 16 | (upgrade|remove) 17 | zgrep --no-filename "$1" $(ls -rt /var/log/dpkg*) 18 | ;; 19 | (rollback) 20 | zgrep --no-filename upgrade $(ls -rt /var/log/dpkg*) \ 21 | | grep "$2" -A10000000 \ 22 | | grep "$3" -B10000000 \ 23 | | awk '{print $4"="$5}' 24 | ;; 25 | (list) 26 | zcat $(ls -rt /var/log/dpkg*) 27 | ;; 28 | (*) 29 | cat >&2 < 6 | # Sorin Ionescu 7 | # 8 | 9 | # function deb-kbuild { 10 | 11 | make-kpkg clean 12 | MAKEFLAGS='' time fakeroot make-kpkg \ 13 | --append-to-version '-custom' \ 14 | --revision "$(date +"%Y%m%d")" \ 15 | kernel_image \ 16 | kernel_headers 17 | 18 | # } 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/emacs/README.md: -------------------------------------------------------------------------------- 1 | Emacs 2 | ===== 3 | 4 | Enables Emacs dependency management. 5 | 6 | Dependency management 7 | --------------------- 8 | 9 | [Carton][1] installs and manages Emacs packages for Emacs package development 10 | and Emacs configuration. 11 | 12 | This module prepends the Carton directory to the path variable to enable the 13 | execution of `carton`. 14 | 15 | Aliases 16 | ------- 17 | 18 | ### Carton 19 | 20 | - `cai` installs dependencies. 21 | - `cau` updates dependencies. 22 | - `caI` initializes the current directory for dependency management. 23 | - `cae` executes a command which correct dependencies. 24 | 25 | Authors 26 | ------- 27 | 28 | *The authors of this module should be contacted via the [issue tracker][2].* 29 | 30 | - [Sebastian Wiesner](https://github.com/lunaryorn) 31 | 32 | [1]: https://github.com/rejeep/carton 33 | [2]: https://github.com/sorin-ionescu/prezto/issues 34 | -------------------------------------------------------------------------------- /home/.zprezto/modules/emacs/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Configures Emacs dependency management. 3 | # 4 | # Authors: Sebastian Wiesner 5 | # 6 | 7 | # Return if requirements are not found. 8 | if [[ ! -d "$HOME/.cask" ]]; then 9 | return 1 10 | fi 11 | 12 | # Prepend Cask bin directory. 13 | path=($HOME/.cask/bin $path) 14 | 15 | # Load Carton completion 16 | source "$HOME/.cask/etc/cask_completion.zsh" 2> /dev/null 17 | 18 | # 19 | # Aliases 20 | # 21 | 22 | alias cai='cask install' 23 | alias cau='cask update' 24 | alias caI='cask init' 25 | alias cae='cask exec' 26 | -------------------------------------------------------------------------------- /home/.zprezto/modules/environment/README.md: -------------------------------------------------------------------------------- 1 | Environment 2 | =========== 3 | 4 | Sets general shell options and defines environment variables. 5 | 6 | This module must be loaded first. 7 | 8 | Environment Variables 9 | --------------------- 10 | 11 | Contributors 12 | ------------ 13 | 14 | This module **MUST NOT** rely on any command not built in Zsh. 15 | 16 | Non-interactive environment variables should be defined in [`zshenv`][1]. 17 | 18 | Authors 19 | ------- 20 | 21 | *The authors of this module should be contacted via the [issue tracker][2].* 22 | 23 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 24 | 25 | [1]: https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zshenv 26 | [2]: https://github.com/sorin-ionescu/prezto/issues 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/fasd/README.md: -------------------------------------------------------------------------------- 1 | Fasd 2 | ==== 3 | 4 | [Fasd][1] is a command-line productivity booster, inspired by tools like 5 | [autojump][2], [z][3] and [v][4], it offers quick access to files and 6 | directories by keeping track of files and directories that were previously 7 | accessed. 8 | 9 | For completion to work, this module must be loaded **after** the *completion* 10 | module. 11 | 12 | The Prezto Fasd configuration differs from the default. The default aliases have 13 | been disabled. 14 | 15 | Installation 16 | ------------ 17 | 18 | `fasd` is bundled with prezto as a git submodule. Alternatively, you can manually install `fasd`. 19 | If a manual install is found, it will be used instead of the bundled version. 20 | 21 | Aliases 22 | ------- 23 | 24 | - `j` changes the current working directory interactively. 25 | 26 | Completion 27 | ---------- 28 | 29 | Type `,`, `f,`, `d,` in front of a comma-separated query or type `,,`, `,,f`, 30 | `,,d` at the end of a comma-separated query then hit tab. 31 | 32 | Authors 33 | ------- 34 | 35 | *The authors of this module should be contacted via the [issue tracker][5].* 36 | 37 | - [Wei Dai](https://github.com/clvv) 38 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 39 | 40 | [1]: https://github.com/clvv/fasd 41 | [2]: https://github.com/joelthelion/autojump 42 | [3]: https://github.com/rupa/z 43 | [4]: https://github.com/rupa/v 44 | [5]: https://github.com/sorin-ionescu/prezto/issues 45 | -------------------------------------------------------------------------------- /home/.zprezto/modules/fasd/external/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011, 2012 by Wei Dai. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/fasd/external/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX?= /usr/local 2 | BINDIR?= ${PREFIX}/bin 3 | MANDIR?= ${PREFIX}/share/man 4 | INSTALL?= install 5 | INSTALLDIR= ${INSTALL} -d 6 | INSTALLBIN= ${INSTALL} -m 755 7 | INSTALLMAN= ${INSTALL} -m 644 8 | 9 | all: fasd.1 10 | 11 | uninstall: 12 | rm -f ${DESTDIR}${BINDIR}/fasd 13 | rm -f ${DESTDIR}${MANDIR}/man1/fasd.1 14 | 15 | install: 16 | ${INSTALLDIR} ${DESTDIR}${BINDIR} 17 | ${INSTALLBIN} fasd ${DESTDIR}${BINDIR} 18 | ${INSTALLDIR} ${DESTDIR}${MANDIR}/man1 19 | ${INSTALLMAN} fasd.1 ${DESTDIR}${MANDIR}/man1 20 | 21 | man: fasd.1 22 | 23 | fasd.1: fasd.1.md 24 | pandoc -s -w man fasd.1.md -o fasd.1 25 | 26 | .PHONY: all install uninstall man 27 | 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/fasd/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Maintains a frequently used file and directory list for fast access. 3 | # 4 | # Authors: 5 | # Wei Dai 6 | # Sorin Ionescu 7 | # 8 | 9 | # Load dependencies. 10 | pmodload 'editor' 11 | 12 | # If the command doesn't exist externally, we need to fall back to the bundled 13 | # submodule. 14 | if (( ! $+commands[fasd] )); then 15 | source "${0:h}/external/fasd" || return 1 16 | fi 17 | 18 | # 19 | # Initialization 20 | # 21 | 22 | cache_file="${TMPDIR:-/tmp}/prezto-fasd-cache.$UID.zsh" 23 | if [[ "${commands[fasd]}" -nt "$cache_file" || ! -s "$cache_file" ]]; then 24 | # Set the base init arguments. 25 | init_args=(zsh-hook) 26 | 27 | # Set fasd completion init arguments, if applicable. 28 | if zstyle -t ':prezto:module:completion' loaded; then 29 | init_args+=(zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install) 30 | fi 31 | 32 | # Cache init code. 33 | fasd --init "$init_args[@]" >! "$cache_file" 2> /dev/null 34 | fi 35 | 36 | source "$cache_file" 37 | 38 | unset cache_file init_args 39 | 40 | function fasd_cd { 41 | local fasd_ret="$(fasd -d "$@")" 42 | if [[ -d "$fasd_ret" ]]; then 43 | cd "$fasd_ret" 44 | else 45 | print "$fasd_ret" 46 | fi 47 | } 48 | 49 | # 50 | # Aliases 51 | # 52 | 53 | # Changes the current working directory interactively. 54 | alias j='fasd_cd -i' 55 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/_git-hub-browse: -------------------------------------------------------------------------------- 1 | #compdef git-hub-browse 2 | #autoload 3 | 4 | # 5 | # Completes git-hub-browse. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 12 | return 1 13 | fi 14 | 15 | local state expl remotes remote branches_or_tags branches tags files ret=1 16 | 17 | _arguments -C -s -S \ 18 | '1::args:->remote' \ 19 | '2::args:->branch-or-tag' \ 20 | '3::args:->file' && ret=0 21 | 22 | case "$state" in 23 | (remote) 24 | remotes=($(command git config --get-regexp 'remote.*.url' | cut -d. -f2)) 25 | 26 | _describe -t branch 'remotes' remotes && ret=0 27 | ;; 28 | (branch-or-tag) 29 | remote="$words[(($CURRENT - 1))]" 30 | 31 | branches_or_tags=($( 32 | command git ls-remote --heads --tags "$remote" 2> /dev/null | cut -f2 33 | )) 34 | 35 | branches=(HEAD ${${(M)branches_or_tags[@]##refs/heads/?##}##refs/heads/}) 36 | tags=(${${(M)branches_or_tags[@]##refs/tags/?##}##refs/tags/}) 37 | 38 | _describe -t branch 'branches' branches && ret=0 39 | _describe -t tag 'tags' tags && ret=0 40 | ;; 41 | (file) 42 | files=(${(0)"$(_call_program files command git ls-files -z --exclude-standard 2> /dev/null)"}) 43 | _wanted file expl 'file' _multi_parts - / files && ret=0 44 | ;; 45 | esac 46 | 47 | return $ret 48 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/_git-hub-shorten-url: -------------------------------------------------------------------------------- 1 | #compdef git-hub-shorten-url 2 | #autoload 3 | 4 | # 5 | # Completes git-hub-shorten-url. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | local service="$service" 12 | 13 | zstyle ":completion:*:${service}:*:prefixes" ignored-patterns '^http(|s)://' 14 | zstyle ":completion:*:${service}:*:hosts" ignored-patterns '^*github.com' 15 | 16 | _arguments '1::GitHub URL:_urls' '2::code:' && return 0 17 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/_git-info: -------------------------------------------------------------------------------- 1 | #compdef git-info 2 | #autoload 3 | 4 | # 5 | # Completes git-info. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 12 | return 1 13 | fi 14 | 15 | _arguments "1:toggle:(( 16 | on\:'enable in-prompt information for the current repository' 17 | off\:'disable in-prompt information for the current repository' 18 | ))" && return 0 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/_git-submodule-move: -------------------------------------------------------------------------------- 1 | #compdef git-submodule-move 2 | #autoload 3 | 4 | # 5 | # Completes git-submodule-move. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 12 | return 1 13 | fi 14 | 15 | local state expl ret=1 16 | local -a submodules 17 | local submodule 18 | 19 | _arguments -C -s -S \ 20 | '1::args:->submodule' \ 21 | '2::args:->directory' && ret=0 22 | 23 | case "$state" in 24 | (submodule) 25 | while IFS=$'\n' read submodule; do 26 | submodules+=("$submodule") 27 | done < <( 28 | command git config --file "$(git-root)/.gitmodules" --list \ 29 | | grep '.path=' \ 30 | | cut -d= -f2- 31 | ) 32 | 33 | _describe -t submodule 'submodules' submodules && ret=0 34 | ;; 35 | (directory) 36 | _wanted directories expl 'directory' _path_files -/ || _message 'directory' 37 | ;; 38 | esac 39 | 40 | return $ret 41 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/_git-submodule-remove: -------------------------------------------------------------------------------- 1 | #compdef git-submodule-remove 2 | #autoload 3 | 4 | # 5 | # Completes git-submodule-remove. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 12 | return 1 13 | fi 14 | 15 | local -a submodules 16 | local submodule 17 | 18 | while IFS=$'\n' read submodule; do 19 | submodules+=("$submodule") 20 | done < <( 21 | command git config --file "$(git-root)/.gitmodules" --list \ 22 | | grep '.path=' \ 23 | | cut -d= -f2- 24 | ) 25 | 26 | _describe -t submodule 'submodules' submodules && return 0 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-branch-current: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the current Git branch. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-branch-current { 9 | 10 | if ! command git rev-parse 2> /dev/null; then 11 | print "$0: not a repository: $PWD" >&2 12 | return 1 13 | fi 14 | 15 | local ref="$(command git symbolic-ref HEAD 2> /dev/null)" 16 | 17 | if [[ -n "$ref" ]]; then 18 | print "${ref#refs/heads/}" 19 | return 0 20 | else 21 | return 1 22 | fi 23 | 24 | # } 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-commit-lost: -------------------------------------------------------------------------------- 1 | # 2 | # Lists lost Git commits. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-commit-lost { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | fi 14 | 15 | command git fsck 2> /dev/null \ 16 | | grep "^dangling commit" \ 17 | | awk '{print $3}' \ 18 | | command git log \ 19 | --date-order \ 20 | --no-walk \ 21 | --stdin \ 22 | --pretty=format:${_git_log_oneline_format} 23 | 24 | # } 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-dir: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the path to the Git directory. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-dir { 9 | 10 | local git_dir="${$(command git rev-parse --git-dir):A}" 11 | 12 | if [[ -n "$git_dir" ]]; then 13 | print "$git_dir" 14 | return 0 15 | else 16 | print "$0: not a repository: $PWD" >&2 17 | return 1 18 | fi 19 | 20 | # } 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-hub-shorten-url: -------------------------------------------------------------------------------- 1 | # 2 | # Shortens GitHub URLs. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-hub-shorten-url { 9 | 10 | local url="$1" code="$2" 11 | 12 | if [[ "$url" == '-' ]]; then 13 | read url <&0 14 | fi 15 | 16 | if [[ -z "$url" || ! "$url" =~ ^https?:\/\/.*github.com\/ ]]; then 17 | print "usage: $0 [ url | - ] [code] ; url must be a github.com URL" >&2 18 | return 1 19 | fi 20 | 21 | if (( $+commands[curl] )); then 22 | curl -s -i 'https://git.io' -F "url=$url" ${(s: :)code:+ -F "code=$code"} | sed -n 's/^Location: //p' 23 | else 24 | print "$0: command not found: curl" >&2 25 | return 1 26 | fi 27 | 28 | # } 29 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-root: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the path to the working tree root. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-root { 9 | 10 | local root="$(command git rev-parse --show-toplevel 2> /dev/null)" 11 | 12 | if [[ -n "$root" ]]; then 13 | print "$root" 14 | return 0 15 | else 16 | print "$0: not a repository work tree: $PWD" >&2 17 | return 1 18 | fi 19 | 20 | # } 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-stash-clear-interactive: -------------------------------------------------------------------------------- 1 | # 2 | # Asks for confirmation before clearing the Git stash. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-stash-clear-interactive { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | fi 14 | 15 | local stashed 16 | 17 | if [[ -f "$(git-dir)/refs/stash" ]]; then 18 | stashed="$(command git stash list 2> /dev/null | wc -l | awk '{print $1}')" 19 | if (( $stashed > 0 )); then 20 | if read -q "?Clear $stashed stashed state(s) [y/N]? "; then 21 | command git stash clear 22 | fi 23 | fi 24 | fi 25 | 26 | # } 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-stash-dropped: -------------------------------------------------------------------------------- 1 | # 2 | # Lists dropped Git stashed states. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-stash-dropped { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | fi 14 | 15 | command git fsck --unreachable 2> /dev/null \ 16 | | grep 'commit' \ 17 | | awk '{print $3}' \ 18 | | command git log \ 19 | --pretty=format:${_git_log_oneline_format} \ 20 | --extended-regexp \ 21 | --grep="${1:-(WIP )?[Oo]n [^:]+:}" \ 22 | --merges \ 23 | --no-walk \ 24 | --stdin 25 | 26 | # } 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-stash-recover: -------------------------------------------------------------------------------- 1 | # 2 | # Recovers dropped Git stashed states. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-stash-recover { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | fi 14 | 15 | local commit 16 | 17 | for commit in "$@"; do 18 | command git update-ref \ 19 | -m "$(command git log -1 --pretty="format:%s" "$commit")" refs/stash "$commit" 20 | done 21 | 22 | # } 23 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-submodule-move: -------------------------------------------------------------------------------- 1 | # 2 | # Moves a Git submodule. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-submodule-move { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | elif [[ "$PWD" != "$(git-root)" ]]; then 14 | print "$0: must be run from the root of the work tree" >&2 15 | return 1 16 | fi 17 | 18 | local src="$1" 19 | local dst="$2" 20 | local url 21 | 22 | url="$(command git config --file "$(git-root)/.gitmodules" --get "submodule.${src}.url")" 23 | 24 | if [[ -z "$url" ]]; then 25 | print "$0: submodule not found: $src" >&2 26 | return 1 27 | fi 28 | 29 | mkdir -p "${dst:h}" 30 | 31 | git-submodule-remove "$src" 32 | command git submodule add "$url" "$dst" 33 | 34 | return 0 35 | 36 | # } 37 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/functions/git-submodule-remove: -------------------------------------------------------------------------------- 1 | # 2 | # Removes a Git submodule. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function git-submodule-remove { 9 | 10 | if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then 11 | print "$0: not a repository work tree: $PWD" >&2 12 | return 1 13 | elif [[ "$PWD" != "$(git-root)" ]]; then 14 | print "$0: must be run from the root of the work tree" >&2 15 | return 1 16 | elif ! command git config --file .gitmodules --get "submodule.${1}.path" &> /dev/null; then 17 | print "$0: submodule not found: $1" >&2 18 | return 1 19 | fi 20 | 21 | command git config --file "$(git-dir)/config" --remove-section "submodule.${1}" &> /dev/null 22 | command git config --file "$(git-root)/.gitmodules" --remove-section "submodule.${1}" &> /dev/null 23 | command git add .gitmodules 24 | 25 | command git rm --cached -rf "${1}" 26 | rm -rf "${1}" 27 | rm -rf "$(git-dir)/modules/${1}" 28 | 29 | return 0 30 | 31 | # } 32 | -------------------------------------------------------------------------------- /home/.zprezto/modules/git/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Provides Git aliases and functions. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Return if requirements are not found. 9 | if (( ! $+commands[git] )); then 10 | return 1 11 | fi 12 | 13 | # Load dependencies. 14 | pmodload 'helper' 15 | 16 | # Source module files. 17 | source "${0:h}/alias.zsh" 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/gnu-utility/README.md: -------------------------------------------------------------------------------- 1 | GNU Utility 2 | =========== 3 | 4 | Provides for the interactive use of GNU utilities on BSD systems. 5 | 6 | Installing GNU utilities on non-GNU systems in `$PATH` without a prefix, i.e. 7 | `ls` instead of `gls`, is not recommended since scripts that target other 8 | utilities will be broken. 9 | 10 | This module wraps GNU utilities in functions without a prefix for interactive 11 | use. 12 | 13 | This module must be loaded **before** the *utility* module. 14 | 15 | Settings 16 | -------- 17 | 18 | ### Prefix 19 | 20 | To use a different prefix, add the following to *zpreztorc*, and replace 'g' with 21 | the desired prefix: 22 | 23 | ```sh 24 | zstyle ':prezto:module:gnu-utility' prefix 'g' 25 | ``` 26 | 27 | Authors 28 | ------- 29 | 30 | *The authors of this module should be contacted via the [issue tracker][1].* 31 | 32 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 33 | 34 | [1]: https://github.com/sorin-ionescu/prezto/issues 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/gpg/README.md: -------------------------------------------------------------------------------- 1 | GPG 2 | === 3 | 4 | Provides for an easier use of [GPG][1] by setting up [gpg-agent][2]. 5 | 6 | ### SSH 7 | 8 | To enable OpenSSH Agent protocol emulation, and make `gpg-agent` a drop-in 9 | replacement for `ssh-agent`, add the following line to 10 | *~/.gnupg/gpg-agent.conf*: 11 | 12 | ```conf 13 | enable-ssh-support 14 | ``` 15 | 16 | When OpenSSH Agent protocol emulation is enabled, this module will load the SSH 17 | module for additional processing. 18 | 19 | Authors 20 | ------- 21 | 22 | *The authors of this module should be contacted via the [issue tracker][3].* 23 | 24 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 25 | 26 | [1]: http://www.gnupg.org 27 | [2]: http://linux.die.net/man/1/gpg-agent 28 | [3]: https://github.com/sorin-ionescu/prezto/issues 29 | -------------------------------------------------------------------------------- /home/.zprezto/modules/haskell/README.md: -------------------------------------------------------------------------------- 1 | Haskell 2 | ======= 3 | 4 | Enables local Haskell package installation. 5 | 6 | Per-user Package Installation 7 | ----------------------------- 8 | 9 | [Cabal][1], the Haskell package manager, can install packages into per user 10 | directories. 11 | 12 | This module prepends per user directories to the relevant path variables to 13 | enable the execution of user installed executables and the reading of 14 | documentation. 15 | 16 | ### Usage 17 | 18 | Install packages into per user directories with `cabal install --user`. 19 | 20 | Authors 21 | ------- 22 | 23 | *The authors of this module should be contacted via the [issue tracker][2].* 24 | 25 | - [Sebastian Wiesner](https://github.com/lunaryorn) 26 | 27 | [1]: http://www.haskell.org/cabal/ 28 | [2]: https://github.com/sorin-ionescu/prezto/issues 29 | -------------------------------------------------------------------------------- /home/.zprezto/modules/haskell/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Enables local Haskell package installation. 3 | # 4 | # Authors: 5 | # Sebastian Wiesner 6 | # 7 | 8 | # Return if requirements are not found. 9 | if (( ! $+commands[ghc] )); then 10 | return 1 11 | fi 12 | 13 | # Prepend Cabal per user directories to PATH. 14 | if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then 15 | path=($HOME/Library/Haskell/bin(/N) $path) 16 | else 17 | path=($HOME/.cabal/bin(/N) $path) 18 | fi 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/helper/README.md: -------------------------------------------------------------------------------- 1 | Helper 2 | ====== 3 | 4 | Provides helper functions for developing modules. 5 | 6 | Functions 7 | --------- 8 | 9 | - `add-zsh-trap` adds a function name to a list to be called when a trap is 10 | triggered. 11 | - `is-autoloadable` checks if a file can be autoloaded by trying to load it 12 | in a subshell. 13 | - `is-callable` checks if a name is a command, function, or alias. 14 | - `is-true` checks a boolean variable for "true". 15 | - `coalesce` prints the first non-empty string in the arguments array. 16 | 17 | Authors 18 | ------- 19 | 20 | *The authors of this module should be contacted via the [issue tracker][1].* 21 | 22 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 23 | 24 | [1]: https://github.com/sorin-ionescu/prezto/issues 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/helper/functions/add-zsh-trap: -------------------------------------------------------------------------------- 1 | # 2 | # Provides for trapping UNIX signals and calling callback functions when a trap 3 | # is triggered. 4 | # 5 | # Authors: 6 | # Sorin Ionescu 7 | # 8 | 9 | # Adds a function name to a list to be called when a trap is triggered. 10 | function add-zsh-trap { 11 | if (( $# < 2 )); then 12 | print "usage: $0 type function" >&2 13 | return 1 14 | fi 15 | 16 | if [[ -z "$signals[(r)$1]" ]]; then 17 | print "$0: unknown signal: $1" >&2 18 | return 1 19 | fi 20 | 21 | local trap_functions="TRAP${1}_FUNCTIONS" 22 | if (( ! ${(P)+trap_functions} )); then 23 | typeset -gaU "$trap_functions" 24 | fi 25 | eval "$trap_functions+="$2"" 26 | 27 | if (( ! $+functions[TRAP${1}] )); then 28 | eval " 29 | function TRAP${1} { 30 | for trap_function in \"\$TRAP${1}_FUNCTIONS[@]\"; do 31 | if (( \$+functions[\$trap_function] )); then 32 | \"\$trap_function\" \"\$1\" 33 | fi 34 | done 35 | return \$(( 128 + \$1 )) 36 | } 37 | " 38 | fi 39 | } 40 | 41 | add-zsh-trap "$@" 42 | -------------------------------------------------------------------------------- /home/.zprezto/modules/helper/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines helper functions. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Checks if a file can be autoloaded by trying to load it in a subshell. 9 | function is-autoloadable { 10 | ( unfunction $1 ; autoload -U +X $1 ) &> /dev/null 11 | } 12 | 13 | # Checks if a name is a command, function, or alias. 14 | function is-callable { 15 | (( $+commands[$1] || $+functions[$1] || $+aliases[$1] || $+builtins[$1] )) 16 | } 17 | 18 | # Checks a boolean variable for "true". 19 | # Case insensitive: "1", "y", "yes", "t", "true", "o", and "on". 20 | function is-true { 21 | [[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]] 22 | } 23 | 24 | # Prints the first non-empty string in the arguments array. 25 | function coalesce { 26 | for arg in $argv; do 27 | print "$arg" 28 | return 0 29 | done 30 | return 1 31 | } 32 | -------------------------------------------------------------------------------- /home/.zprezto/modules/history-substring-search/external/.gitignore: -------------------------------------------------------------------------------- 1 | # zsh word code files (zcompile) 2 | *.zwc 3 | -------------------------------------------------------------------------------- /home/.zprezto/modules/homebrew/README.md: -------------------------------------------------------------------------------- 1 | Homebrew 2 | ======== 3 | 4 | Defines Homebrew aliases. 5 | 6 | Aliases 7 | ------- 8 | 9 | ### Homebrew 10 | 11 | - `brewc` cleans outdated brews and their cached archives. 12 | - `brewC` cleans outdated brews, including keg-only, and their cached archives. 13 | - `brewi` installs a formula. 14 | - `brewl` lists installed formulae. 15 | - `brewo` lists brews which have an update available. 16 | - `brews` searches for a formula. 17 | - `brewu` updates and upgrades Homebrew packages and formulae. 18 | - `brewx` uninstalls a formula. 19 | 20 | ### Homebrew Cask 21 | 22 | - `cask` is aliased to `brew cask`. 23 | - `caskc` cleans up old cached downloads. 24 | - `caskC` cleans up all cached downloads. 25 | - `caski` installs a cask. 26 | - `caskl` lists installed casks. 27 | - `casko` lists casks which have an update available. 28 | - `casks` searches for a cask. 29 | - `caskx` uninstalls a cask. 30 | 31 | Authors 32 | ------- 33 | 34 | *The authors of this module should be contacted via the [issue tracker][1].* 35 | 36 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 37 | - [Griffin Yourick](https://github.com/tough-griff) 38 | 39 | [1]: https://github.com/sorin-ionescu/prezto/issues 40 | -------------------------------------------------------------------------------- /home/.zprezto/modules/homebrew/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines Homebrew aliases. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Return if requirements are not found. 9 | if [[ "$OSTYPE" != (darwin|linux)* ]]; then 10 | return 1 11 | fi 12 | 13 | # 14 | # Aliases 15 | # 16 | 17 | # Homebrew 18 | alias brewc='brew cleanup' 19 | alias brewC='brew cleanup --force' 20 | alias brewi='brew install' 21 | alias brewl='brew list' 22 | alias brewo='brew outdated' 23 | alias brews='brew search' 24 | alias brewu='brew update && brew upgrade' 25 | alias brewx='brew remove' 26 | 27 | # Homebrew Cask 28 | alias cask='brew cask' 29 | alias caskc='brew cask cleanup --outdated' 30 | alias caskC='brew cask cleanup' 31 | alias caski='brew cask install' 32 | alias caskl='brew cask list' 33 | alias casko='brew cask outdated' 34 | alias casks='brew cask search' 35 | alias caskx='brew cask uninstall' 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/macports/README.md: -------------------------------------------------------------------------------- 1 | MacPorts 2 | ======== 3 | 4 | Defines MacPorts aliases and adds MacPorts directories to path variables. 5 | 6 | Aliases 7 | ------- 8 | 9 | - `portc` cleans the files used to build ports. 10 | - `porti` installs a port. 11 | - `ports` searches for a port. 12 | - `portu` upgrades a port. 13 | - `portU` upgrades MacPorts, the ports collection, and outdated ports. 14 | - `portx` uninstalls a port. 15 | - `portX` uninstalls inactive ports. 16 | 17 | Authors 18 | ------- 19 | 20 | *The authors of this module should be contacted via the [issue tracker][1].* 21 | 22 | - [Matt Cable](https://github.com/curiousstranger) 23 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 24 | 25 | [1]: https://github.com/sorin-ionescu/prezto/issues 26 | -------------------------------------------------------------------------------- /home/.zprezto/modules/macports/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines MacPorts aliases and adds MacPorts directories to path variables. 3 | # 4 | # Authors: 5 | # Matt Cable 6 | # Sorin Ionescu 7 | # 8 | 9 | # Return if requirements are not found. 10 | if [[ "$OSTYPE" != darwin* ]]; then 11 | return 1 12 | fi 13 | 14 | # 15 | # Paths 16 | # 17 | 18 | # Set the list of directories that Zsh searches for programs. 19 | path=( 20 | /opt/local/{bin,sbin} 21 | $path 22 | ) 23 | 24 | # 25 | # Aliases 26 | # 27 | 28 | alias portc='sudo port clean --all installed' 29 | alias porti='sudo port install' 30 | alias ports='port search' 31 | alias portU='sudo port selfupdate && sudo port upgrade outdated' 32 | alias portu='sudo port upgrade' 33 | alias portX='sudo port -u uninstall' 34 | alias portx='sudo port uninstall' 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/node/functions/node-doc: -------------------------------------------------------------------------------- 1 | # 2 | # Opens the Node.js online API documentation in the default browser. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function node-doc { 9 | 10 | if [[ -z "$BROWSER" ]]; then 11 | print "$0: no web browser defined" >&2 12 | return 1 13 | fi 14 | 15 | # TODO: Make the sections easier to use. 16 | "$BROWSER" "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}" 17 | 18 | # } 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/node/functions/node-info: -------------------------------------------------------------------------------- 1 | # 2 | # Exposes information about the Node.js environment via the $node_info 3 | # associative array. 4 | # 5 | # Authors: 6 | # Zeh Rizzatti 7 | # 8 | 9 | # function node-info { 10 | 11 | local version 12 | local version_format 13 | local version_formatted 14 | 15 | unset node_info 16 | typeset -gA node_info 17 | 18 | if (( $+functions[nvm_version] )); then 19 | version="${$(nvm_version)#v}" 20 | elif (( $+commands[nodenv] )); then 21 | version="${${$(nodenv version)#v}[(w)0]}" 22 | fi 23 | 24 | if [[ "$version" != (none|) ]]; then 25 | zstyle -s ':prezto:module:node:info:version' format 'version_format' 26 | zformat -f version_formatted "$version_format" "v:$version" 27 | node_info[version]="$version_formatted" 28 | fi 29 | 30 | # } 31 | -------------------------------------------------------------------------------- /home/.zprezto/modules/node/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Loads the Node Version Manager and enables npm completion. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # Zeh Rizzatti 7 | # 8 | 9 | # Load manually installed NVM into the shell session. 10 | if [[ -s "$HOME/.nvm/nvm.sh" ]]; then 11 | source "$HOME/.nvm/nvm.sh" 12 | 13 | # Load package manager installed NVM into the shell session. 14 | elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2> /dev/null)" ]]; then 15 | source "$(brew --prefix nvm)/nvm.sh" 16 | 17 | # Load manually installed nodenv into the shell session. 18 | elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then 19 | path=("$HOME/.nodenv/bin" $path) 20 | eval "$(nodenv init - --no-rehash zsh)" 21 | 22 | # Load package manager installed nodenv into the shell session. 23 | elif (( $+commands[nodenv] )); then 24 | eval "$(nodenv init - --no-rehash zsh)" 25 | 26 | # Return if requirements are not found. 27 | elif (( ! $+commands[node] )); then 28 | return 1 29 | fi 30 | 31 | # Load NPM completion. 32 | if (( $+commands[npm] )); then 33 | cache_file="${TMPDIR:-/tmp}/prezto-node-cache.$UID.zsh" 34 | 35 | if [[ "$commands[npm]" -nt "$cache_file" || ! -s "$cache_file" ]]; then 36 | # npm is slow; cache its output. 37 | npm completion >! "$cache_file" 2> /dev/null 38 | fi 39 | 40 | source "$cache_file" 41 | 42 | unset cache_file 43 | fi 44 | -------------------------------------------------------------------------------- /home/.zprezto/modules/ocaml/README.md: -------------------------------------------------------------------------------- 1 | OCaml 2 | ===== 3 | 4 | Initializes [OCaml][1] package management. 5 | 6 | OPAM 7 | ---- 8 | 9 | [OPAM][2] is a package manager for OCaml. 10 | 11 | This module enables local package installation with OPAM by extending the 12 | relevant path and OCaml variables. 13 | 14 | ### Usage 15 | 16 | Install packages to your local package directory with `opam install`. 17 | 18 | Authors 19 | ------- 20 | 21 | *The authors of this module should be contacted via the [issue tracker][3].* 22 | 23 | - [Sebastian Wiesner](https://github.com/lunaryorn) 24 | 25 | [1]: http://ocaml.org/ 26 | [2]: http://opam.ocamlpro.com/ 27 | [3]: https://github.com/sorin-ionescu/prezto/issues 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/ocaml/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Initializes OCaml package management. 3 | # 4 | # Authors: 5 | # Sebastian Wiesner 6 | # 7 | 8 | # Return if requirements are not found. 9 | if [[ ! -f "$HOME/.opam/opam-init/init.zsh" ]]; then 10 | return 1 11 | fi 12 | 13 | # Initialize OPAM. 14 | source "$HOME/.opam/opam-init/init.zsh" 15 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/_mand_manp: -------------------------------------------------------------------------------- 1 | #compdef mand manp 2 | #autoload 3 | 4 | # 5 | # Completes mand and manp. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _man 12 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/mand: -------------------------------------------------------------------------------- 1 | # 2 | # Opens man pages in Dash.app. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | function mand { 9 | if (( $# > 0 )); then 10 | zstyle -s ':prezto:module:osx:man' dash-keyword 'dashkw' || dashkw='manpages' 11 | open "dash://$dashkw:$1" 2> /dev/null 12 | if (( $? != 0 )); then 13 | print "$0: Dash is not installed" >&2 14 | break 15 | fi 16 | else 17 | print 'What manual page do you want?' >&2 18 | fi 19 | 20 | unset dashkw 21 | } 22 | 23 | mand "$@" 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/manp: -------------------------------------------------------------------------------- 1 | # 2 | # Opens man pages in Preview.app. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | function manp { 9 | local page 10 | if (( $# > 0 )); then 11 | for page in "$@"; do 12 | man -t "$page" | open -f -a Preview 13 | done 14 | else 15 | print 'What manual page do you want?' >&2 16 | fi 17 | } 18 | 19 | manp "$@" 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/osx-ls-download-history: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the macOS download history. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function osx-ls-download-history { 9 | 10 | local db 11 | for db in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV*; do 12 | if grep -q 'LSQuarantineEvent' < <(sqlite3 "$db" .tables); then 13 | sqlite3 "$db" 'SELECT LSQuarantineDataURLString FROM LSQuarantineEvent' 14 | fi 15 | done 16 | 17 | # } 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/osx-rm-dir-metadata: -------------------------------------------------------------------------------- 1 | # 2 | # Deletes .DS_Store and __MACOSX directories. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function osx-rm-dir-metadata { 9 | 10 | find "${@:-$PWD}" \( \ 11 | -type f -name '.DS_Store' -o \ 12 | -type d -name '__MACOSX' \ 13 | \) -print0 | xargs -0 rm -rf 14 | 15 | # } 16 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/osx-rm-download-history: -------------------------------------------------------------------------------- 1 | # 2 | # Deletes the macOS download history. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function osx-rm-download-history { 9 | 10 | local db 11 | for db in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV*; do 12 | if grep -q 'LSQuarantineEvent' < <(sqlite3 "$db" .tables); then 13 | sqlite3 "$db" 'DELETE FROM LSQuarantineEvent; VACUUM' 14 | fi 15 | done 16 | 17 | # } 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/functions/pfd: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the current Finder.app directory. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function pfd { 9 | 10 | osascript 2> /dev/null < 6 | # 7 | 8 | # function pfs { 9 | 10 | osascript 2>&1 < 6 | # 7 | 8 | # function ql { 9 | 10 | if (( $# > 0 )); then 11 | qlmanage -p "$@" &> /dev/null 12 | fi 13 | 14 | # } 15 | -------------------------------------------------------------------------------- /home/.zprezto/modules/osx/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines macOS aliases and functions. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Return if requirements are not found. 9 | if [[ "$OSTYPE" != darwin* ]]; then 10 | return 1 11 | fi 12 | 13 | # 14 | # Aliases 15 | # 16 | 17 | # Changes directory to the current Finder directory. 18 | alias cdf='cd "$(pfd)"' 19 | 20 | # Pushes directory to the current Finder directory. 21 | alias pushdf='pushd "$(pfd)"' 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/pacman/functions/pacman-list-disowned: -------------------------------------------------------------------------------- 1 | # 2 | # Lists Pacman disowned files. 3 | # 4 | # Authors: 5 | # Benjamin Boudreau 6 | # Sorin Ionescu 7 | # 8 | 9 | # function pacman-list-disowned { 10 | 11 | local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$" 12 | local db="$tmp/db" 13 | local fs="$tmp/fs" 14 | 15 | mkdir "$tmp" 16 | trap 'rm -rf "$tmp"' EXIT 17 | 18 | pacman --quiet --query --list | sort --unique > "$db" 19 | 20 | find /bin /etc /lib /sbin /usr \ 21 | ! -name lost+found \ 22 | \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" 23 | 24 | comm -23 "$fs" "$db" 25 | 26 | # } 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/pacman/functions/pacman-list-explicit: -------------------------------------------------------------------------------- 1 | # 2 | # Lists explicitly installed Pacman packages. 3 | # 4 | # Authors: 5 | # Benjamin Boudreau 6 | # Sorin Ionescu 7 | # 8 | 9 | # function pacman-list-explicit { 10 | 11 | pacman --query --explicit --info \ 12 | | awk ' 13 | BEGIN { 14 | FS=":" 15 | } 16 | /^Name/ { 17 | print $2 18 | } 19 | /^Description/ { 20 | print $2 21 | } 22 | ' 23 | 24 | # } 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/perl/functions/perl-info: -------------------------------------------------------------------------------- 1 | # 2 | # Exposes information about the Perl environment via the $perl_info associative 3 | # array. 4 | # 5 | # Authors: 6 | # JINNOUCHI Yasushi 7 | # 8 | 9 | # function perl-info { 10 | 11 | local version 12 | local version_format 13 | local version_formatted 14 | 15 | # Clean up previous $perl_info. 16 | unset perl_info 17 | typeset -gA perl_info 18 | 19 | if (( $+commands[perlbrew] )); then 20 | version="${PERLBREW_PERL##*perl-}" 21 | elif (( $+commands[plenv] )); then 22 | version=$(plenv version-name) 23 | elif (( $+commands[perl] )); then 24 | version=$(perl -e 'printf "%vd", $^V') 25 | fi 26 | 27 | # Format version. 28 | if [[ -n "$version" ]]; then 29 | zstyle -s ':prezto:module:perl:info:version' format 'version_format' 30 | zformat -f version_formatted "$version_format" "v:$version" 31 | perl_info[version]="$version_formatted" 32 | fi 33 | 34 | # } 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/agnoster/characters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/agnoster/characters.png -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/agnoster/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/agnoster/screenshot.png -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/async/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = tab 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.{yml,json}] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/async/.travis.yml: -------------------------------------------------------------------------------- 1 | language: sh 2 | 3 | addons: 4 | apt: 5 | packages: 6 | - build-essential 7 | 8 | env: 9 | global: 10 | - ZSH_DIST=$HOME/.zshdist 11 | matrix: 12 | # Use _ZSH_VERSION since if ZSH_VERSION is present, travis cacher thinks it 13 | # is running in zsh and tries to use zsh specific functions. 14 | - _ZSH_VERSION=5.4.2 15 | - _ZSH_VERSION=5.3.1 16 | - _ZSH_VERSION=5.3 17 | - _ZSH_VERSION=5.2 18 | - _ZSH_VERSION=5.1.1 19 | - _ZSH_VERSION=5.0.8 20 | - _ZSH_VERSION=5.0.2 21 | 22 | cache: 23 | directories: 24 | - $ZSH_DIST 25 | 26 | before_script: 27 | - > 28 | setup_zsh() { 29 | dest="$ZSH_DIST/$1" 30 | if [[ ! -d $dest/bin ]]; then 31 | tmp="$(mktemp --directory --tmpdir="${TMPDIR:/tmp}" zshbuild.XXXXXX)" 32 | ( 33 | cd "$tmp" && 34 | curl -L http://downloads.sourceforge.net/zsh/zsh-${1}.tar.gz | tar zx && 35 | cd zsh-$1 && 36 | ./configure --prefix="$dest" && 37 | make && 38 | mkdir -p "$dest" && 39 | make install || 40 | echo "Failed to build zsh-${1}!" 41 | ) 42 | fi 43 | export PATH="$dest/bin:$PATH" 44 | } 45 | - setup_zsh $_ZSH_VERSION 46 | - zsh --version 47 | 48 | script: 49 | - zsh test.zsh -v 50 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/async/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Mathias Fredriksson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/async/async.plugin.zsh: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../.zprezto/modules/prompt/external/async/async.zsh -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/.gitignore: -------------------------------------------------------------------------------- 1 | test-vm/.vagrant 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "shunit2"] 2 | path = shunit2 3 | url = https://github.com/kward/shunit2.git 4 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: true 2 | dist: trusty 3 | language: sh 4 | addons: 5 | apt: 6 | packages: 7 | - build-essential 8 | 9 | before_script: 10 | # Show the git version being used to test. 11 | - "git --version" 12 | # Show the zsh version being used to test. 13 | - "zsh --version" 14 | 15 | install: 16 | - "sudo apt-get update -qq" 17 | - "sudo apt-get install -y zsh" 18 | - "sudo chsh -s $(which zsh)" 19 | - "sudo apt-get install -y git mercurial subversion jq node golang ruby python python-virtualenv" 20 | 21 | script: 22 | - test/powerlevel9k.spec 23 | - test/functions/utilities.spec 24 | - test/functions/colors.spec 25 | - test/functions/icons.spec 26 | - test/segments/command_execution_time.spec 27 | - test/segments/dir.spec 28 | - test/segments/rust_version.spec 29 | - test/segments/go_version.spec 30 | - test/segments/vcs.spec 31 | - test/segments/kubecontext.spec 32 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2017 Ben Hilburn 2 | 3 | MIT LICENSE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antibody/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/antibody/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/antibody/zshrc .zshrc 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antibody/install.zsh: -------------------------------------------------------------------------------- 1 | curl -sL https://git.io/antibody | bash -s 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antibody/zshrc: -------------------------------------------------------------------------------- 1 | source <(antibody init) 2 | antibody bundle ~/p9k/ 3 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antigen/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/antigen/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/antigen/zshrc .zshrc 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antigen/install.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | mkdir ~/antigen 4 | 5 | curl \ 6 | -qLsSf \ 7 | -o ~/antigen/antigen.zsh \ 8 | https://git.io/antigen 9 | 10 | source ~/antigen/antigen.zsh 11 | 12 | # EOF 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/antigen/zshrc: -------------------------------------------------------------------------------- 1 | source ~/antigen/antigen.zsh 2 | 3 | antigen theme "${HOME}/p9k" powerlevel9k --no-local-clone 4 | antigen apply 5 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/base-4.3.11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:6 2 | 3 | RUN \ 4 | yum install -y \ 5 | curl \ 6 | git \ 7 | zsh \ 8 | mercurial \ 9 | subversion \ 10 | golang \ 11 | jq \ 12 | node \ 13 | ruby \ 14 | python \ 15 | python-virtualenv \ 16 | sudo 17 | 18 | RUN adduser --shell /bin/zsh --comment 'fred' --user-group fred 19 | 20 | COPY docker/fred-sudoers /etc/sudoers.d/fred 21 | 22 | USER fred 23 | WORKDIR /home/fred 24 | ENV LANG=en_US.UTF-8 25 | ENV TERM=xterm-256color 26 | ENV DEFAULT_USER=fred 27 | ENV POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true 28 | 29 | RUN touch .zshrc 30 | 31 | CMD ["/bin/zsh", "-l"] 32 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/base-5.0.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | RUN \ 4 | apt-get update && \ 5 | echo 'golang-go golang-go/dashboard boolean false' | debconf-set-selections && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get install -y \ 7 | curl \ 8 | git \ 9 | zsh \ 10 | mercurial \ 11 | subversion \ 12 | golang \ 13 | jq \ 14 | node \ 15 | ruby \ 16 | python \ 17 | python-virtualenv 18 | 19 | RUN adduser --shell /bin/zsh --gecos 'fred' --disabled-password fred 20 | RUN locale-gen "en_US.UTF-8" 21 | 22 | COPY docker/fred-sudoers /etc/sudoers.d/fred 23 | 24 | USER fred 25 | WORKDIR /home/fred 26 | ENV LANG=en_US.UTF-8 27 | ENV TERM=xterm-256color 28 | ENV DEFAULT_USER=fred 29 | ENV POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true 30 | 31 | RUN touch .zshrc 32 | 33 | CMD ["/bin/zsh", "-l"] 34 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/base-5.1.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN \ 4 | apt-get update && \ 5 | echo 'golang-go golang-go/dashboard boolean false' | debconf-set-selections && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get install -y \ 7 | curl \ 8 | git \ 9 | zsh \ 10 | mercurial \ 11 | subversion \ 12 | golang \ 13 | jq \ 14 | nodejs \ 15 | ruby \ 16 | python \ 17 | python-virtualenv \ 18 | sudo \ 19 | locales 20 | 21 | RUN adduser --shell /bin/zsh --gecos 'fred' --disabled-password fred 22 | RUN locale-gen "en_US.UTF-8" 23 | 24 | COPY docker/fred-sudoers /etc/sudoers.d/fred 25 | 26 | USER fred 27 | WORKDIR /home/fred 28 | ENV LANG=en_US.UTF-8 29 | ENV TERM=xterm-256color 30 | ENV DEFAULT_USER=fred 31 | ENV POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true 32 | 33 | RUN touch .zshrc 34 | 35 | CMD ["/bin/zsh", "-l"] 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/base-5.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:17.04 2 | 3 | RUN \ 4 | apt-get update && \ 5 | echo 'golang-go golang-go/dashboard boolean false' | debconf-set-selections && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get install -y \ 7 | curl \ 8 | git \ 9 | zsh \ 10 | mercurial \ 11 | subversion \ 12 | golang \ 13 | jq \ 14 | nodejs \ 15 | ruby \ 16 | python \ 17 | python-virtualenv \ 18 | sudo \ 19 | locales 20 | 21 | RUN adduser --shell /bin/zsh --gecos 'fred' --disabled-password fred 22 | RUN locale-gen "en_US.UTF-8" 23 | 24 | COPY docker/fred-sudoers /etc/sudoers.d/fred 25 | 26 | USER fred 27 | WORKDIR /home/fred 28 | ENV LANG=en_US.UTF-8 29 | ENV TERM=xterm-256color 30 | ENV DEFAULT_USER=fred 31 | ENV POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true 32 | 33 | RUN touch .zshrc 34 | 35 | CMD ["/bin/zsh", "-l"] 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/dotfile/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY ./ p9k/ 5 | COPY docker/dotfile/zshrc .zshrc 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/dotfile/zshrc: -------------------------------------------------------------------------------- 1 | source "${HOME}/p9k/prompt_powerlevel9k_setup" 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/fred-sudoers: -------------------------------------------------------------------------------- 1 | Defaults:fred !requiretty 2 | fred ALL=(ALL) NOPASSWD: ALL 3 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/omz/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/omz/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY docker/omz/zshrc .zshrc 8 | COPY ./ p9k/ 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/omz/install.zsh: -------------------------------------------------------------------------------- 1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 2 | 3 | mkdir -p ~/.oh-my-zsh/custom/themes 4 | ln -nsf ~/p9k/ ~/.oh-my-zsh/custom/themes/powerlevel9k 5 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/omz/zshrc: -------------------------------------------------------------------------------- 1 | export ZSH=$HOME/.oh-my-zsh 2 | ZSH_THEME="powerlevel9k/powerlevel9k" 3 | plugins=(git rake ruby) 4 | 5 | source $ZSH/oh-my-zsh.sh 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/prezto/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/prezto/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/prezto/install.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | set -eu 4 | 5 | git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" 6 | 7 | setopt EXTENDED_GLOB 8 | for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do 9 | ln -nsf "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" 10 | done 11 | 12 | ln -s "${HOME}/p9k/powerlevel9k.zsh-theme" \ 13 | "${HOME}/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup" 14 | 15 | echo "zstyle ':prezto:module:prompt' theme 'powerlevel9k'" \ 16 | >> "${HOME}/.zpreztorc" 17 | 18 | # EOF 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zgen/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zgen/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/zgen/zshrc .zshrc 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zgen/install.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen" 4 | 5 | # EOF 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zgen/zshrc: -------------------------------------------------------------------------------- 1 | # load zgen 2 | source ~/.zgen/zgen.zsh 3 | 4 | # if the init scipt doesn't exist 5 | if ! zgen saved; then 6 | zgen load ~/p9k/powerlevel9k.zsh-theme 7 | 8 | # generate the init script from plugins above 9 | zgen save 10 | fi 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zim/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zim/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zim/install.zsh: -------------------------------------------------------------------------------- 1 | #!zsh 2 | 3 | git clone --recursive https://github.com/Eriner/zim.git "${ZDOTDIR:-${HOME}}/.zim" 4 | 5 | setopt EXTENDED_GLOB 6 | for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do 7 | user_file="${ZDOTDIR:-${HOME}}/.${template_file:t}" 8 | touch ${user_file} 9 | ( print -rn "$(<${template_file})$(<${user_file})" >! ${user_file} ) 2>/dev/null 10 | done 11 | 12 | source "${ZDOTDIR:-${HOME}}/.zlogin" 13 | 14 | ln -nsf \ 15 | ~/p9k/ \ 16 | ~/.zim/modules/prompt/external-themes/powerlevel9k 17 | ln -nsf \ 18 | ~/.zim/modules/prompt/external-themes/powerlevel9k/powerlevel9k.zsh-theme \ 19 | ~/.zim/modules/prompt/functions/prompt_powerlevel9k_setup 20 | 21 | sed -i "s/zprompt_theme='steeef'/zprompt_theme='powerlevel9k'/g" ~/.zimrc 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplug/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zplug/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/zplug/zshrc .zshrc 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplug/install.zsh: -------------------------------------------------------------------------------- 1 | #!zsh 2 | 3 | curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh| zsh 4 | 5 | # git clone https://github.com/zplug/zplug "${HOME}/.zplug" 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplug/zshrc: -------------------------------------------------------------------------------- 1 | #!zsh 2 | 3 | source ~/.zplug/init.zsh 4 | zplug "${HOME}/p9k", use:"powerlevel9k.zsh-theme", from:local, as:theme 5 | zplug load --verbose 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplugin/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zplugin/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/zplugin/zshrc.plugins .zshrc.plugins 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplugin/install.zsh: -------------------------------------------------------------------------------- 1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/psprint/zplugin/master/doc/install.sh)" 2 | 3 | # The 'zplugin snippet' only copies the .zsh-theme file, not everything else. 4 | mkdir -p ~/.zplugin/snippets 5 | ln -nsf \ 6 | ~/p9k/ \ 7 | ~/.zplugin/snippets/--SLASH--home--SLASH--fred--SLASH--p9k--SLASH--powerlevel9k--DOT--zsh-theme 8 | 9 | { 10 | echo 11 | echo "source ~/.zshrc.plugins" 12 | } >> ~/.zshrc 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zplugin/zshrc.plugins: -------------------------------------------------------------------------------- 1 | #!zsh 2 | 3 | zplugin load psprint zsh-navigation-tools 4 | zplugin load psprint---zprompts 5 | zplugin snippet ~/p9k/powerlevel9k.zsh-theme 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zpm/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zpm/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | COPY docker/zpm/zshrc .zshrc 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zpm/install.zsh: -------------------------------------------------------------------------------- 1 | # install zpm 2 | git clone --recursive https://github.com/zpm-zsh/zpm.git ~/.zpm 3 | 4 | # Install powerlevel9k 5 | mkdir ~/.zpm/plugins/powerlevel9k 6 | ln -s ~/p9k/powerlevel9k.zsh-theme ~/.zpm/plugins/powerlevel9k/powerlevel9k.plugin.zsh 7 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zpm/zshrc: -------------------------------------------------------------------------------- 1 | source ~/.zpm/zpm.zsh 2 | 3 | zpm load powerlevel9k 4 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zulu/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG base 2 | FROM p9k:${base} 3 | 4 | COPY docker/zulu/install.zsh /tmp/ 5 | RUN zsh /tmp/install.zsh 6 | 7 | COPY ./ p9k/ 8 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/docker/zulu/install.zsh: -------------------------------------------------------------------------------- 1 | #!zsh 2 | 3 | # install zulu https://github.com/zulu-zsh/zulu 4 | curl -L https://git.io/zulu-install | zsh && zsh 5 | 6 | { 7 | echo 'zulu fpath add ~/p9k' 8 | echo 'zulu fpath add ~/p9k/functions' 9 | echo 'zulu theme powerlevel9k' 10 | } >> ~/.zshrc 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/prompt_powerlevel9k_setup: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../.zprezto/modules/prompt/external/powerlevel9k/powerlevel9k.zsh-theme -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/bin/extractDocs.pl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | # $Id$ 3 | 4 | if(@ARGV != 1) { 5 | print "usage: $0 sourceFile\n"; 6 | exit; 7 | } 8 | 9 | $sourceFile = $ARGV[0]; 10 | 11 | # 12 | # read in the source file 13 | # 14 | $rslt = open(FILE, $sourceFile) 15 | || die "could not open file ($sourceFile)"; 16 | 17 | $inComment = 0; 18 | while() { 19 | next if /^[^#]/; 20 | s/^# //; 21 | s/^#//; 22 | 23 | if(/^\/\*\*/) { 24 | $inComment = 1; 25 | next; 26 | } 27 | if(/\*\/$/) { 28 | $inComment = 0; 29 | next; 30 | } 31 | 32 | if ($inComment == 1) { print $_ }; 33 | if ($inComment == 0 && /\/\/\*/) { 34 | @line = split /\/\/\*/, $_, 2; 35 | $line[1] =~ s/^ //; 36 | print $line[1]; 37 | } 38 | } 39 | 40 | close(FILE); 41 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/bin/which: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # $Id$ 3 | # 4 | # This is a simple implementation of the 'which' command for those OSes that 5 | # don't have one. 6 | # 7 | 8 | true; TRUE=$? 9 | false; FALSE=$? 10 | 11 | showAll=${FALSE} 12 | 13 | # process command line flags 14 | while getopts 'a' opt; do 15 | case ${opt} in 16 | a) showAll=${TRUE} 17 | esac 18 | done 19 | shift `expr ${OPTIND} - 1` 20 | 21 | # exit if no arguments were given 22 | [ $# -eq 0 ] && exit 1 23 | 24 | command=$1 25 | 26 | # search for command 27 | out=`echo "${PATH}" |sed "s/:/\n/g" |\ 28 | while read path; do 29 | fullPath="${path}/${command}" 30 | if [ -x "${fullPath}" ]; then 31 | echo "${fullPath}" 32 | [ ${showAll} -eq ${FALSE} ] && break 33 | fi 34 | done` 35 | [ -z "${out}" ] && exit 1 36 | echo "${out}" 37 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/RELEASE_NOTES-2.0.0.txt: -------------------------------------------------------------------------------- 1 | RELEASE NOTES FOR 2.0.0 2 | 3 | This is the initial release of shunit2. It was originally included in log4sh 4 | 1.3.5 [http://log4sh.sourceforge.net/] as a unit testing framework for that 5 | product. It has since grown table enough to warrant being released into the 6 | wild on its own. 7 | 8 | 9 | TESTED PLATFORMS 10 | 11 | This list of platforms comes from the latest version of log4sh as shunit2 is 12 | used in the testing of log4sh on each of these platforms. 13 | 14 | Cygwin 15 | + bash 3.2.9(10) 16 | + pdksh 5.2.14 17 | 18 | Linux 19 | + bash 3.1.17(1) 20 | + dash 0.5.3 21 | + ksh 1993-12-28 22 | + pdksh 5.2.14 23 | + zsh 4.3.2 (does not work) 24 | 25 | Mac OS X 1.4.8 (Darwin 8.8) 26 | + bash 2.05b.0(1) 27 | + ksh 1993-12-28 28 | 29 | Solaris 8 U3 (x86) 30 | + /bin/sh 31 | + bash 2.03.0(1) 32 | + ksh M-11/16/88i 33 | 34 | Solaris 10 U2 (sparc) 35 | + /bin/sh 36 | + bash 3.00.16(1) 37 | + ksh M-11/16/88i 38 | 39 | Solaris 10 U2 (x86) 40 | + /bin/sh 41 | + bash 3.00.16(1) 42 | + ksh M-11/16/88i 43 | 44 | 45 | NEW FEATURES 46 | 47 | None. 48 | 49 | 50 | CHANGES AND ENHANCEMENTS 51 | 52 | None. 53 | 54 | 55 | BUG FIXES 56 | 57 | None. 58 | 59 | 60 | DEPRECATED FEATURES 61 | 62 | None. 63 | 64 | 65 | KNOWN BUGS AND ISSUES 66 | 67 | None. 68 | 69 | 70 | $Revision$ 71 | vim:spell 72 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/RELEASE_NOTES-2.0.2.txt: -------------------------------------------------------------------------------- 1 | RELEASE NOTES FOR 2.0.2 2 | 3 | This is solely a bug-fix release. 4 | 5 | 6 | TESTED PLATFORMS 7 | 8 | This list of platforms comes from the latest version of log4sh as shUnit2 is 9 | used in the testing of log4sh on each of these platforms. 10 | 11 | Cygwin 12 | + bash 3.2.9(10) 13 | + pdksh 5.2.14 14 | 15 | Linux 16 | + bash 3.1.17(1) 17 | + dash 0.5.3 18 | + ksh 1993-12-28 19 | + pdksh 5.2.14 20 | + zsh 4.3.2 (does not work) 21 | 22 | Mac OS X 1.4.8 (Darwin 8.8) 23 | + bash 2.05b.0(1) 24 | + ksh 1993-12-28 25 | 26 | Solaris 8 U3 (x86) 27 | + /bin/sh 28 | + bash 2.03.0(1) 29 | + ksh M-11/16/88i 30 | 31 | Solaris 10 U2 (sparc) 32 | + /bin/sh 33 | + bash 3.00.16(1) 34 | + ksh M-11/16/88i 35 | 36 | Solaris 10 U2 (x86) 37 | + /bin/sh 38 | + bash 3.00.16(1) 39 | + ksh M-11/16/88i 40 | 41 | 42 | NEW FEATURES 43 | 44 | None. 45 | 46 | 47 | CHANGES AND ENHANCEMENTS 48 | 49 | None. 50 | 51 | 52 | BUG FIXES 53 | 54 | The fail() function did not output the optional failure message. 55 | 56 | Fixed the Makefile so that the DocBook XML and XSLT files would be downloaded 57 | before parsing can continue. 58 | 59 | 60 | DEPRECATED FEATURES 61 | 62 | None. 63 | 64 | 65 | KNOWN BUGS AND ISSUES 66 | 67 | None. 68 | 69 | 70 | $Revision$ 71 | vim:spell 72 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/RELEASE_NOTES-2.0.4.txt: -------------------------------------------------------------------------------- 1 | RELEASE NOTES FOR 2.0.4 2 | 3 | This is a minor bugfix release. 4 | 5 | See the CHANGES-2.0.txt file for a full list of changes. 6 | 7 | 8 | TESTED PLATFORMS 9 | 10 | This list of platforms comes from the latest version of log4sh as shUnit2 is 11 | used in the testing of log4sh on each of these platforms. 12 | 13 | Cygwin -- untested 14 | 15 | Linux 16 | - bash 3.2.13(1) 17 | - dash 0.5.3 18 | - ksh 1993-12-28 19 | - pdksh 5.2.14 20 | 21 | Mac OS X -- untested 22 | Solaris 8 -- untested 23 | Solaris 10 -- untested 24 | 25 | 26 | NEW FEATURES 27 | 28 | None. 29 | 30 | 31 | CHANGES AND ENHANCEMENTS 32 | 33 | None. 34 | 35 | 36 | BUG FIXES 37 | 38 | The library no longer fails when the 'od' command is not present. 39 | 40 | 41 | DEPRECATED FEATURES 42 | 43 | None. 44 | 45 | 46 | KNOWN BUGS AND ISSUES 47 | 48 | Functions do not properly test for an invalid number of arguments. 49 | 50 | 51 | vim:spell 52 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/TODO.txt: -------------------------------------------------------------------------------- 1 | Make it possible to execute a single test by passing the name of the test on 2 | the command line 3 | 4 | 5 | $Revision$ 6 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/contributors.txt: -------------------------------------------------------------------------------- 1 | The original author of shunit2 is Kate Ward. The following people have 2 | contributed in some way or another to shunit2. 3 | 4 | Bryan Larsen 5 | Kevin Van Horn 6 | Mathias Goldau 7 | Richard Jensen 8 | Rob Holland 9 | 10 | $Revision$ 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/doc/style.css: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | style.css 4 | */ 5 | 6 | 7 | body { 8 | 9 | /* 10 | Style the HMTL tag with a sans-serif font and 6% margin. 11 | A sans-serif font makes documents easier to read when displayed on 12 | a computer screen. Whitespace surrounding the document should 13 | make it easier to read both on screen and on printed paper. The 14 | value of 6% was chosen because it closely approximates a one-half 15 | inch margin on a US letter (8.5" by 11") paper. Since the margin 16 | is expressed as a percentage it should scale well in a web browser 17 | window. 18 | */ 19 | 20 | font-family: sans-serif; 21 | margin: 6%; 22 | } 23 | 24 | /* 25 | table { 26 | font-size: 0.9em; 27 | } 28 | */ 29 | 30 | .toc { 31 | background: #f0f0f0; 32 | padding: 5px; 33 | } 34 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/lib/sh/shlib: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # vim:syntax=sh 3 | # 4 | # library of shell functions 5 | # 6 | 7 | shlib_relToAbsPath() 8 | { 9 | _shlib_path=$1 10 | 11 | # deal with paths that start with / 12 | echo "${_shlib_path}" |grep '^/' >/dev/null 2>&1 13 | if [ $? -ne 0 ]; then 14 | _shlib_pwd=`pwd` 15 | _shlib_path="${_shlib_pwd}/${_shlib_path}" 16 | unset _shlib_pwd 17 | fi 18 | 19 | # clean up the path 20 | echo "${_shlib_path}" |sed 's/[^/]*\/*\.\.\/*//g;s/\/\.\//\//' 21 | 22 | unset _shlib_path 23 | } 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 18 | start 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | 12 | text/css 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/src/docbook/functions.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | Functions 13 | This XML file is a placeholder. It is meant to be overwritten with the dynamically generated XML document that is extracted from the source code. 14 | 15 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/src/test/testInternalFx: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # $Id$ 3 | # vim: expandtab 4 | # author: Kate Ward 5 | # 6 | # Self-testing unit tests for shUnit2 internal functions 7 | # 8 | 9 | #----------------------------------------------------------------------------- 10 | # suite tests 11 | # 12 | 13 | testGenerateReport() 14 | { 15 | : 16 | } 17 | 18 | #----------------------------------------------------------------------------- 19 | # suite functions 20 | # 21 | 22 | # load and run shUnit2 23 | . ./shunit2 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.0/src/test/testSuiteFx: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # $Id$ 3 | # vim: expandtab 4 | # author: Kate Ward 5 | # 6 | # Self-testing unit tests for shUnit2 suite functions 7 | # 8 | 9 | #----------------------------------------------------------------------------- 10 | # suite tests 11 | # 12 | 13 | testAddTest() 14 | { 15 | : 16 | } 17 | 18 | #----------------------------------------------------------------------------- 19 | # suite functions 20 | # 21 | 22 | # load and run shUnit2 23 | . ./shunit2 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/bin/gen_test_results.flags: -------------------------------------------------------------------------------- 1 | # $Id: gen_test_results.flags 145 2011-06-10 11:45:17Z kate.ward@forestent.com $ 2 | # vim:et:ft=sh:sts=2:sw=2 3 | # 4 | # Copyright 2011 Kate Ward. All Rights Reserved. 5 | # Released under the LGPL (GNU Lesser General Public License) 6 | # 7 | # Author: kate.ward@forestent.com (Kate Ward) 8 | # 9 | # Flag definition overrides for the gen_test_results.sh script. 10 | # 11 | 12 | DEFINE_string suite 'shunit2_test.sh' 'unit test suite' s 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/bin/which: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # $Id$ 3 | # 4 | # This is a simple implementation of the 'which' command for those OSes that 5 | # don't have one. 6 | # 7 | 8 | true; TRUE=$? 9 | false; FALSE=$? 10 | 11 | showAll=${FALSE} 12 | 13 | # process command line flags 14 | while getopts 'a' opt; do 15 | case ${opt} in 16 | a) showAll=${TRUE} 17 | esac 18 | done 19 | shift `expr ${OPTIND} - 1` 20 | 21 | # exit if no arguments were given 22 | [ $# -eq 0 ] && exit 1 23 | 24 | command=$1 25 | 26 | # search for command 27 | out=`echo "${PATH}" |sed "s/:/\n/g" |\ 28 | while read path; do 29 | fullPath="${path}/${command}" 30 | if [ -x "${fullPath}" ]; then 31 | echo "${fullPath}" 32 | [ ${showAll} -eq ${FALSE} ] && break 33 | fi 34 | done` 35 | [ -z "${out}" ] && exit 1 36 | echo "${out}" 37 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/doc/TODO.txt: -------------------------------------------------------------------------------- 1 | Make it possible to execute a single test by passing the name of the test on 2 | the command line 3 | 4 | Add support for '--randomize-order' so that the test order is randomized to 5 | check for dependencies (which shouldn't be there) between tests. 6 | 7 | --debug option to display point in source code (line number and such) where the 8 | problem showed up. 9 | 10 | assertTrue() just gives 'ASSERT:', nothing else :-(. others too? 11 | upd: assertNull() will give message passed, but nothing else useful :-( 12 | 13 | $Revision$ 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/doc/contributors.txt: -------------------------------------------------------------------------------- 1 | The original author of shunit2 is Kate Ward. The following people have 2 | contributed in some way or another to shunit2. 3 | 4 | Bryan Larsen 5 | Kevin Van Horn 6 | Maciej Bliziński 7 | Mario Sparada 8 | Mathias Goldau 9 | Richard Jensen 10 | Rob Holland 11 | Rocky Bernstein 12 | wood4321 (of code.google.com) 13 | 14 | $Revision$ 15 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/doc/shunit2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/doc/shunit2.txt -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/examples/equality_test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # file: examples/equality_test.sh 3 | 4 | testEquality() 5 | { 6 | assertEquals 1 1 7 | } 8 | 9 | # load shunit2 10 | . ../src/shunit2 11 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/examples/lineno_test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # file: examples/lineno_test.sh 3 | 4 | testLineNo() 5 | { 6 | # this assert will have line numbers included (e.g. "ASSERT:[123] ...") if 7 | # they are supported. 8 | echo "_ASSERT_EQUALS_ macro value: ${_ASSERT_EQUALS_}" 9 | ${_ASSERT_EQUALS_} 'not equal' 1 2 10 | 11 | # this assert will not have line numbers included (e.g. "ASSERT: ...") 12 | assertEquals 'not equal' 1 2 13 | } 14 | 15 | # load shunit2 16 | . ../src/shunit2 17 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/examples/math.inc: -------------------------------------------------------------------------------- 1 | # available as examples/math.inc 2 | 3 | add_generic() 4 | { 5 | num_a=$1 6 | num_b=$2 7 | 8 | expr $1 + $2 9 | } 10 | 11 | add_bash() 12 | { 13 | num_a=$1 14 | num_b=$2 15 | 16 | echo $(($1 + $2)) 17 | } 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/examples/math_test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # available as examples/math_test.sh 3 | 4 | testAdding() 5 | { 6 | result=`add_generic 1 2` 7 | assertEquals \ 8 | "the result of '${result}' was wrong" \ 9 | 3 "${result}" 10 | 11 | # disable non-generic tests 12 | [ -z "${BASH_VERSION:-}" ] && startSkipping 13 | 14 | result=`add_bash 1 2` 15 | assertEquals \ 16 | "the result of '${result}' was wrong" \ 17 | 3 "${result}" 18 | } 19 | 20 | oneTimeSetUp() 21 | { 22 | # load include to test 23 | . ./math.inc 24 | } 25 | 26 | # load and run shUnit2 27 | . ../src/shunit2 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/examples/party_test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # file: examples/party_test.sh 3 | 4 | testEquality() 5 | { 6 | assertEquals 1 1 7 | } 8 | 9 | testPartyLikeItIs1999() 10 | { 11 | year=`date '+%Y'` 12 | assertEquals "It's not 1999 :-(" \ 13 | '1999' "${year}" 14 | } 15 | 16 | # load shunit2 17 | . ../src/shunit2 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/lib/shlib: -------------------------------------------------------------------------------- 1 | # vim:et:ft=sh:sts=2:sw=2 2 | # 3 | # Copyright 2008 Kate Ward. All Rights Reserved. 4 | # Released under the LGPL (GNU Lesser General Public License). 5 | # 6 | # Author: kate.ward@forestent.com (Kate Ward) 7 | # 8 | # Library of shell functions. 9 | 10 | # Convert a relative path into it's absolute equivalent. 11 | # 12 | # This function will automatically prepend the current working directory if the 13 | # path is not already absolute. It then removes all parent references (../) to 14 | # reconstruct the proper absolute path. 15 | # 16 | # Args: 17 | # shlib_path_: string: relative path 18 | # Outputs: 19 | # string: absolute path 20 | shlib_relToAbsPath() 21 | { 22 | shlib_path_=$1 23 | 24 | # prepend current directory to relative paths 25 | echo "${shlib_path_}" |grep '^/' >/dev/null 2>&1 \ 26 | || shlib_path_="${PWD}/${shlib_path_}" 27 | 28 | # clean up the path. if all seds supported true regular expressions, then 29 | # this is what it would be: 30 | shlib_old_=${shlib_path_} 31 | while true; do 32 | shlib_new_=`echo "${shlib_old_}" |sed 's/[^/]*\/\.\.\/*//;s/\/\.\//\//'` 33 | [ "${shlib_old_}" = "${shlib_new_}" ] && break 34 | shlib_old_=${shlib_new_} 35 | done 36 | echo "${shlib_new_}" 37 | 38 | unset shlib_path_ shlib_old_ shlib_new_ 39 | } 40 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/source/2.1/src/shunit2_test_standalone.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # $Id$ 3 | # vim:et:ft=sh:sts=2:sw=2 4 | # 5 | # Copyright 2010 Kate Ward. All Rights Reserved. 6 | # Released under the LGPL (GNU Lesser General Public License) 7 | # Author: kate.ward@forestent.com (Kate Ward) 8 | # 9 | # shUnit2 unit test for standalone operation. 10 | # 11 | # This unit test is purely to test that calling shunit2 directly, while passing 12 | # the name of a unit test script, works. When run, this script determines if it 13 | # is running as a standalone program, and calls main() if it is. 14 | 15 | ARGV0=`basename "$0"` 16 | 17 | # load test helpers 18 | . ./shunit2_test_helpers 19 | 20 | #------------------------------------------------------------------------------ 21 | # suite tests 22 | # 23 | 24 | testStandalone() 25 | { 26 | assertTrue ${SHUNIT_TRUE} 27 | } 28 | 29 | #------------------------------------------------------------------------------ 30 | # main 31 | # 32 | 33 | main() 34 | { 35 | ${TH_SHUNIT} "${ARGV0}" 36 | } 37 | 38 | # are we running as a standalone? 39 | if [ "${ARGV0}" = 'shunit2_test_standalone.sh' ]; then 40 | if [ $# -gt 0 ]; then main "$@"; else main; fi 41 | fi 42 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Please visit the shUnit2 website at http://code.google.com/p/shunit2/.

9 | 10 | 11 | 15 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/.htaccess: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | Options +Indexes 4 | IndexOptions NameWidth=* 5 | 6 | AddType multipart/digest .md5 7 | 8 | RemoveEncoding .tgz 9 | 10 | 11 | AddType application/gpg-signature .sig 12 | 13 | RemoveEncoding .tgz 14 | 15 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.0.tgz.md5: -------------------------------------------------------------------------------- 1 | bdede699570ba09a8c820af2c0c3db34 shunit2-2.0.0.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.0.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.0.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.1.tgz.md5: -------------------------------------------------------------------------------- 1 | 0741e65e1261285e1676e487077b0bf2 shunit2-2.0.1.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.1.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.1.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.2.tgz.md5: -------------------------------------------------------------------------------- 1 | ab8ba8a532da33645c9a6b8ee6783f3c shunit2-2.0.2.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.2.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.2.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.3.tgz.md5: -------------------------------------------------------------------------------- 1 | 9c947dc31e53c7008b3e665c1e6057e0 shunit2-2.0.3.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.3.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.0.3.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.0.tgz.md5: -------------------------------------------------------------------------------- 1 | 8d0e775f811d2a936c5994e5a4add170 shunit2-2.1.0.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.0.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.0.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.1.tgz.md5: -------------------------------------------------------------------------------- 1 | 4e6aa6d54a6beac8435bfddad8d97db3 shunit2-2.1.1.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.1.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.1.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.2.tgz.md5: -------------------------------------------------------------------------------- 1 | 6f7355ba449f421320045337c62652a3 shunit2-2.1.2.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.2.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.2.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.3.tgz.md5: -------------------------------------------------------------------------------- 1 | 156a2491925a269fe09b70562deae091 shunit2-2.1.3.tgz 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.3.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.3.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.4.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.4.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.5.tgz.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerlevel9k/shunit2/website/releases/shunit2-2.1.5.tgz.sig -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-bsd-vm/bootstrap-zero.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkg install -y sudo -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-bsd-vm/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install ZSH 4 | sudo pkg install -y zsh 5 | sudo chsh -s `which zsh` vagrant 6 | sudo ln -s /usr/local/bin/zsh /usr/bin/zsh 7 | 8 | # Install git 9 | sudo pkg install -y git 10 | # Install mercurial 11 | sudo pkg install -y mercurial 12 | # Install subversion 13 | sudo pkg install -y subversion -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm-providers/plain.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | 3 | echo 'LANG=en_US.UTF-8' >! ~/.zshrc 4 | echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc 5 | 6 | echo 'echo "Have a look at the ~/p9k folder for prepared test setups."' >> ~/.zshrc 7 | 8 | # setup environment 9 | /vagrant_data/test-vm-providers/setup-environment.sh -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm-providers/setup-environment.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | 3 | OLDPWD="$(pwd)" 4 | cd $HOME 5 | 6 | TESTFOLDER="${HOME}/p9k" 7 | mkdir -p $TESTFOLDER 8 | cd $TESTFOLDER 9 | 10 | # Make a deep test folder 11 | mkdir -p deep-folder/1/12/123/1234/12345/123456/1234567/123455678/123456789 12 | 13 | # Make a git repo 14 | mkdir git-repo 15 | cd git-repo 16 | git config --global user.email "test@powerlevel9k.theme" 17 | git config --global user.name "Testing Tester" 18 | git init 19 | echo "TEST" >> testfile 20 | git add testfile 21 | git commit -m "Initial commit" 22 | cd $TESTFOLDER 23 | 24 | # Make a Mercurial repo 25 | mkdir hg-repo 26 | cd hg-repo 27 | export HGUSER="Test bot " 28 | hg init 29 | echo "TEST" >> testfile 30 | hg add testfile 31 | hg ci -m "Initial commit" 32 | cd $TESTFOLDER 33 | 34 | # Setup a SVN folder 35 | svnadmin create ~/.svn-repo 36 | mkdir svn-repo 37 | svn checkout "file://${HOME}/.svn-repo" "svn-repo" 38 | cd svn-repo 39 | echo "TEST" >> testfile 40 | svn add testfile 41 | svn commit -m "Initial commit" 42 | cd $TESTFOLDER 43 | 44 | cd $OLDPWD -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm/README.md: -------------------------------------------------------------------------------- 1 | # Test-VM for powerlevel9k 2 | 3 | In this virtual machine you will find a recent ubuntu with preinstalled ZSH, oh-my-zsh, antigen, prezto and - of course - powerlevel9k. The main use-case is to test the powerlevel9k theme. 4 | 5 | ## Installation 6 | 7 | In order to run this virtual machine, you need [vagrant](https://www.vagrantup.com/) and [VirtualBox](http://www.virtualbox.org/). 8 | 9 | ## Running 10 | 11 | `vagrant` is a quite easy to use command line tool to configure a virtual machine. To fire the machine up, just run `vagrant up`. At the first run, it will install a whole ubuntu. With `vagrant ssh` you can log in into the machine. 12 | 13 | ## Testing 14 | 15 | Once you have SSH'd into the machine, you'll see a plain ZSH. To test the other frameworks, you just have to switch to one of the following users: 16 | 17 | * `vagrant-antigen` 18 | * `vagrant-prezto` 19 | * `vagrant-omz` 20 | 21 | To switch use `sudo -i -H -u `. `-i` stands for "simulate initial login", `-H` sets the "$HOME" variable to the directory of the user , `-u` for the username. 22 | 23 | All users have `vagrant` as password and are in the /etc/sudoers. 24 | 25 | The regular `vagrant` user has a plain ZSH with the powerlevel9k theme. 26 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm/antigen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | # We need to run this script in ZSH, so that switching user works! 3 | NEW_USER=vagrant-antigen 4 | # Create User 5 | PASSWORD='$6$OgLg9v2Z$Db38Jr9inZG7y8BzL8kqFK23fF5jZ7FU1oiIBLFjNYR9XVX03fwQayMgA6Rm1rzLbXaf.gkZaTWhB9pv5XLq11' 6 | useradd -p $PASSWORD -g vagrant -s $(which zsh) -m $NEW_USER 7 | echo "$NEW_USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$NEW_USER 8 | chmod 440 /etc/sudoers.d/$NEW_USER 9 | 10 | ( 11 | # Change User (See http://unix.stackexchange.com/questions/86778/why-cant-we-execute-a-list-of-commands-as-different-user-without-sudo) 12 | USERNAME=$NEW_USER 13 | #UID=$(id -u $NEW_USER) 14 | #EUID=$(id -u $NEW_USER) 15 | HOME=/home/$NEW_USER 16 | 17 | echo " 18 | source ~/antigen/antigen.zsh\n 19 | antigen theme /vagrant_data powerlevel9k --no-local-clone\n 20 | antigen apply 21 | " > ~/.zshrc 22 | 23 | # install antigen 24 | mkdir ~/antigen 25 | curl -qL https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > ~/antigen/antigen.zsh 26 | source ~/antigen/antigen.zsh 27 | 28 | # setup environment 29 | /vagrant_data/test-vm-providers/setup-environment.sh 30 | ) 31 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #sudo apt-get update 4 | 5 | sudo apt-get install -y curl 6 | sudo apt-get install -y git 7 | 8 | sudo apt-get install -y zsh 9 | sudo chsh -s $(which zsh) vagrant 10 | 11 | # Install mercurial 12 | sudo apt-get install -y mercurial 13 | # Install Subversion 14 | sudo apt-get install -y subversion 15 | # install golang 16 | echo 'golang-go golang-go/dashboard boolean false' | sudo debconf-set-selections 17 | sudo apt-get install -y golang 18 | # Install dependencies for tests 19 | sudo apt-get install -y jq node ruby python python-virtualenv -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm/omz.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | # We need to run this script in ZSH, so that switching user works! 3 | NEW_USER=vagrant-omz 4 | # Create User 5 | PASSWORD='$6$OgLg9v2Z$Db38Jr9inZG7y8BzL8kqFK23fF5jZ7FU1oiIBLFjNYR9XVX03fwQayMgA6Rm1rzLbXaf.gkZaTWhB9pv5XLq11' 6 | useradd -p $PASSWORD -g vagrant -s $(which zsh) -m $NEW_USER 7 | echo "$NEW_USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$NEW_USER 8 | chmod 440 /etc/sudoers.d/$NEW_USER 9 | 10 | ( 11 | # Change User (See http://unix.stackexchange.com/questions/86778/why-cant-we-execute-a-list-of-commands-as-different-user-without-sudo) 12 | USERNAME=$NEW_USER 13 | #UID=$(id -u $NEW_USER) 14 | #EUID=$(id -u $NEW_USER) 15 | HOME=/home/$NEW_USER 16 | SHELL=$(which zsh) 17 | 18 | sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 19 | 20 | mkdir -p ~/.oh-my-zsh/custom/themes 21 | ln -s /vagrant_data ~/.oh-my-zsh/custom/themes/powerlevel9k 22 | 23 | echo ' 24 | export ZSH=$HOME/.oh-my-zsh 25 | ZSH_THEME="powerlevel9k/powerlevel9k" 26 | plugins=(git rake ruby) 27 | 28 | source $ZSH/oh-my-zsh.sh 29 | ' > $HOME/.zshrc 30 | 31 | # setup environment 32 | /vagrant_data/test-vm-providers/setup-environment.sh 33 | ) 34 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test-vm/prezto.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | # We need to run this script in ZSH, so that switching user works! 3 | NEW_USER=vagrant-prezto 4 | # Create User 5 | PASSWORD='$6$OgLg9v2Z$Db38Jr9inZG7y8BzL8kqFK23fF5jZ7FU1oiIBLFjNYR9XVX03fwQayMgA6Rm1rzLbXaf.gkZaTWhB9pv5XLq11' 6 | useradd -p $PASSWORD -g vagrant -s $(which zsh) -m $NEW_USER 7 | echo "$NEW_USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$NEW_USER 8 | chmod 440 /etc/sudoers.d/$NEW_USER 9 | 10 | ( 11 | # Change User (See http://unix.stackexchange.com/questions/86778/why-cant-we-execute-a-list-of-commands-as-different-user-without-sudo) 12 | USERNAME=$NEW_USER 13 | #UID=$(id -u $NEW_USER) 14 | #EUID=$(id -u $NEW_USER) 15 | HOME=/home/$NEW_USER 16 | 17 | git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" 18 | 19 | setopt EXTENDED_GLOB 20 | for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do 21 | ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" 22 | done 23 | 24 | ln -s /vagrant_data/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup 25 | sed -i "s/theme\ 'sorin'/theme\ 'powerlevel9k'/g" ~/.zpreztorc 26 | 27 | # setup environment 28 | /vagrant_data/test-vm-providers/setup-environment.sh 29 | ) 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test/functions/colors.spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | #vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 3 | 4 | # Required for shunit2 to run correctly 5 | setopt shwordsplit 6 | SHUNIT_PARENT=$0 7 | 8 | function setUp() { 9 | # Load Powerlevel9k 10 | source functions/colors.zsh 11 | } 12 | 13 | function testGetColorCodeWithAnsiForegroundColor() { 14 | assertEquals '002' "$(getColorCode 'green')" 15 | } 16 | 17 | function testGetColorCodeWithAnsiBackgroundColor() { 18 | assertEquals '002' "$(getColorCode 'bg-green')" 19 | } 20 | 21 | function testGetColorCodeWithNumericalColor() { 22 | assertEquals '002' "$(getColorCode '002')" 23 | } 24 | 25 | function testIsSameColorComparesAnsiForegroundAndNumericalColorCorrectly() { 26 | assertTrue "isSameColor 'green' '002'" 27 | } 28 | 29 | function testIsSameColorComparesAnsiBackgroundAndNumericalColorCorrectly() { 30 | assertTrue "isSameColor 'bg-green' '002'" 31 | } 32 | 33 | function testIsSameColorComparesNumericalBackgroundAndNumericalColorCorrectly() { 34 | assertTrue "isSameColor '010' '2'" 35 | } 36 | 37 | function testIsSameColorDoesNotYieldNotEqualColorsTruthy() { 38 | assertFalse "isSameColor 'green' '003'" 39 | } 40 | 41 | 42 | source shunit2/source/2.1/src/shunit2 43 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerlevel9k/test/segments/rust_version.spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | #vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 3 | 4 | # Required for shunit2 to run correctly 5 | setopt shwordsplit 6 | SHUNIT_PARENT=$0 7 | 8 | function setUp() { 9 | export TERM="xterm-256color" 10 | # Load Powerlevel9k 11 | source powerlevel9k.zsh-theme 12 | } 13 | 14 | function mockRust() { 15 | echo 'rustc 0.4.1a-alpha' 16 | } 17 | 18 | function testRust() { 19 | alias rustc=mockRust 20 | POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version) 21 | 22 | assertEquals "%K{208} %F{black}Rust 0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)" 23 | 24 | unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS 25 | unalias rustc 26 | } 27 | 28 | function testRustPrintsNothingIfRustIsNotAvailable() { 29 | alias rustc=noRust 30 | POWERLEVEL9K_CUSTOM_WORLD='echo world' 31 | POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world rust_version) 32 | 33 | assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" 34 | 35 | unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS 36 | unset POWERLEVEL9K_CUSTOM_WORLD 37 | unalias rustc 38 | } 39 | 40 | source shunit2/source/2.1/src/shunit2 41 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/powerline/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/powerline/prompt.png -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [package.json] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### General information 4 | 5 | - Pure version: 1.x.x 6 | - ZSH version: 5.x.x 7 | - Terminal program & version: 8 | - Operating system: 9 | - ZSH framework: 10 | 11 | I have: 12 | - [ ] Tested with another terminal program and can reproduce the issue: 13 | - [ ] Followed the [Integration](https://github.com/sindresorhus/pure#integration) instructions for my framework 14 | 15 | ### Problem description 16 | 17 | 18 | ### Reproduction steps 19 | 20 | 1. 21 | 2. 22 | 3. 23 | 24 | ### My `.zshrc`: 25 | 26 | 30 | 31 | ```shell 32 | autoload -U promptinit; promptinit 33 | prompt pure 34 | ``` 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/arch/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Author: Sindre Sorhus 2 | # Maintainer: Pat Brisbin 3 | # Contributor: Emil Falk 4 | pkgname=zsh-pure-prompt-git 5 | pkgver=r61.7d3b317 6 | pkgrel=1 7 | pkgdesc='A minimal and pure prompt for zsh.' 8 | arch=('any') 9 | url='https://github.com/sindresorhus/pure' 10 | license=('MIT') 11 | depends=('zsh' 'git') 12 | source=("$pkgname::git://github.com/sindresorhus/pure.git") 13 | sha256sums=('SKIP') 14 | 15 | pkgver() { 16 | cd $srcdir/$pkgname 17 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 18 | } 19 | 20 | package() { 21 | cd $srcdir/$pkgname 22 | install -Dm644 pure.zsh \ 23 | "$pkgdir/usr/share/zsh/functions/Prompts/prompt_pure_setup" 24 | install -Dm644 async.zsh \ 25 | "$pkgdir/usr/share/zsh/functions/async" 26 | } 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/pure.plugin.zsh: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../.zprezto/modules/prompt/external/pure/pure.zsh -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/screenshot-title-cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/pure/screenshot-title-cmd.png -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/external/pure/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/prompt/external/pure/screenshot.png -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/async: -------------------------------------------------------------------------------- 1 | ../../../../../../../../.zprezto/modules/prompt/external/async/async.zsh -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/prompt-pwd: -------------------------------------------------------------------------------- 1 | # 2 | # Prompt setup function commonly used by prompt themes. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function prompt-pwd { 9 | 10 | setopt localoptions extendedglob 11 | 12 | local current_pwd="${PWD/#$HOME/~}" 13 | local ret_directory 14 | 15 | if [[ "$current_pwd" == (#m)[/~] ]]; then 16 | ret_directory="$MATCH" 17 | unset MATCH 18 | elif zstyle -m ':prezto:module:prompt' pwd-length 'full'; then 19 | ret_directory=${PWD} 20 | elif zstyle -m ':prezto:module:prompt' pwd-length 'long'; then 21 | ret_directory=${current_pwd} 22 | else 23 | ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}" 24 | fi 25 | 26 | unset current_pwd 27 | 28 | print "$ret_directory" 29 | 30 | # } 31 | -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/prompt_agnoster_setup: -------------------------------------------------------------------------------- 1 | ../../../../../../../../.zprezto/modules/prompt/external/agnoster/agnoster.zsh-theme -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup: -------------------------------------------------------------------------------- 1 | ../../../../../../../../.zprezto/modules/prompt/external/powerlevel9k/powerlevel9k.zsh-theme -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/prompt_powerline_setup: -------------------------------------------------------------------------------- 1 | ../../../../../../../../.zprezto/modules/prompt/external/powerline/prompt_powerline_setup -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/functions/prompt_pure_setup: -------------------------------------------------------------------------------- 1 | ../../../../../../../../.zprezto/modules/prompt/external/pure/pure.zsh -------------------------------------------------------------------------------- /home/.zprezto/modules/prompt/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Loads prompt themes. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Load and execute the prompt theming system. 9 | autoload -Uz promptinit && promptinit 10 | 11 | # Load the prompt theme. 12 | zstyle -a ':prezto:module:prompt' theme 'prompt_argv' 13 | if [[ "$TERM" == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then 14 | prompt 'off' 15 | else 16 | prompt "$prompt_argv[@]" 17 | fi 18 | unset prompt_argv 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/rails/README.md: -------------------------------------------------------------------------------- 1 | Ruby on Rails 2 | ============= 3 | 4 | Defines [Ruby on Rails][1] aliases. 5 | 6 | Aliases 7 | ------- 8 | 9 | - `ror` is short for `rails`. 10 | - `rorc` starts the Rails console. 11 | - `rordc` starts the Rails console connected to the database. 12 | - `rordm` migrates the database. 13 | - `rordM` migrates the database and recreates the test database. 14 | - `rordr` rolls the database schema back to the previous version. 15 | - `rorg` generates new code. 16 | - `rorl` displays the log. 17 | - `rorlc` truncates logs to zero bytes. 18 | - `rorp` installs a plugin. 19 | - `rorr` runs code in the application environment. 20 | - `rors` starts the Rails server. 21 | - `rorsd` starts the Rails server with the debugger. 22 | - `rorx` destroys newly generated code. 23 | 24 | Authors 25 | ------- 26 | 27 | *The authors of this module should be contacted via the [issue tracker][2].* 28 | 29 | - [Robby Russell](https://github.com/robbyrussell) 30 | - [Jake Bell](https://github.com/theunraveler) 31 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 32 | 33 | [1]: http://rubyonrails.org 34 | [2]: https://github.com/sorin-ionescu/prezto/issues 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/rails/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines Ruby on Rails aliases. 3 | # 4 | # Authors: 5 | # Robby Russell 6 | # Jake Bell 7 | # Sorin Ionescu 8 | # 9 | 10 | # Load dependencies. 11 | pmodload 'ruby' 12 | 13 | # Return if requirements are not found. 14 | if (( ! $+commands[bundle] )); then 15 | return 1 16 | fi 17 | 18 | # 19 | # Aliases 20 | # 21 | 22 | alias ror='bundle exec rails' 23 | alias rorc='bundle exec rails console' 24 | alias rordc='bundle exec rails dbconsole' 25 | alias rordm='bundle exec rake db:migrate' 26 | alias rordM='bundle exec rake db:migrate db:test:clone' 27 | alias rordr='bundle exec rake db:rollback' 28 | alias rorg='bundle exec rails generate' 29 | alias rorl='tail -f "$(ruby-app-root)/log/development.log"' 30 | alias rorlc='bundle exec rake log:clear' 31 | alias rorp='bundle exec rails plugin' 32 | alias rorr='bundle exec rails runner' 33 | alias rors='bundle exec rails server' 34 | alias rorsd='bundle exec rails server --debugger' 35 | alias rorx='bundle exec rails destroy' 36 | -------------------------------------------------------------------------------- /home/.zprezto/modules/rsync/README.md: -------------------------------------------------------------------------------- 1 | Rsync 2 | ===== 3 | 4 | Defines [rsync][1] aliases. 5 | 6 | macOS users are encouraged to use [Bombich's rsync][2], which has HFS+ 7 | enhancements. 8 | 9 | Aliases 10 | ------- 11 | 12 | - `rsync-copy` copies files and directories from *source* to *destination*. 13 | - `rsync-move` moves files and directories from *source* to *destination*. 14 | - `rsync-update` updates files and directories on *destination*. 15 | - `rsync-synchronize` synchronizes files and directories between *source* and 16 | *destination*. 17 | 18 | Authors 19 | ------- 20 | 21 | *The authors of this module should be contacted via the [issue tracker][3].* 22 | 23 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 24 | 25 | [1]: http://rsync.samba.org 26 | [2]: https://bombich.com/kb/ccc5/credits#rsync 27 | [3]: https://github.com/sorin-ionescu/prezto/issues 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/rsync/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines Rsync aliases. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Return if requirements are not found. 9 | if (( ! $+commands[rsync] )); then 10 | return 1 11 | fi 12 | 13 | # 14 | # Aliases 15 | # 16 | 17 | _rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system' 18 | 19 | if grep -q 'xattrs' <(rsync --help 2>&1); then 20 | _rsync_cmd="${_rsync_cmd} --acls --xattrs" 21 | fi 22 | 23 | # macOS and HFS+ Enhancements 24 | # http://help.bombich.com/kb/overview/credits#opensource 25 | if [[ "$OSTYPE" == darwin* ]] && grep -q 'file-flags' <(rsync --help 2>&1); then 26 | _rsync_cmd="${_rsync_cmd} --crtimes --fileflags --protect-decmpfs --force-change" 27 | fi 28 | 29 | alias rsync-copy="${_rsync_cmd}" 30 | alias rsync-move="${_rsync_cmd} --remove-source-files" 31 | alias rsync-update="${_rsync_cmd} --update" 32 | alias rsync-synchronize="${_rsync_cmd} --update --delete" 33 | 34 | unset _rsync_cmd 35 | -------------------------------------------------------------------------------- /home/.zprezto/modules/ruby/functions/ruby-app-root: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the path to the Ruby application root directory. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function ruby-app-root { 9 | 10 | local root_dir="$PWD" 11 | 12 | while [[ "$root_dir" != '/' ]]; do 13 | if [[ -f "$root_dir/Gemfile" ]]; then 14 | print "$root_dir" 15 | break 16 | fi 17 | root_dir="$root_dir:h" 18 | done 19 | 20 | return 1 21 | 22 | # } 23 | -------------------------------------------------------------------------------- /home/.zprezto/modules/ruby/functions/ruby-info: -------------------------------------------------------------------------------- 1 | # 2 | # Exposes information about the Ruby environment via the $ruby_info associative 3 | # array. 4 | # 5 | # Authors: 6 | # Sorin Ionescu 7 | # 8 | 9 | # function ruby-info { 10 | 11 | local version 12 | local version_format 13 | local version_formatted 14 | 15 | # Clean up previous $ruby_info. 16 | unset ruby_info 17 | typeset -gA ruby_info 18 | 19 | # Grab formatting for anything we might have to do 20 | zstyle -s ':prezto:module:ruby:info:version' format 'version_format' 21 | 22 | if [[ -n "$version_format" ]]; then 23 | if (( $+commands[rvm-prompt] )); then 24 | version="$(rvm-prompt)" 25 | elif (( $+commands[rbenv] )); then 26 | version="$(rbenv version-name)" 27 | elif (( $+commands[ruby] )); then 28 | version="${${$(ruby --version)[(w)1,(w)2]}/ /-}" 29 | fi 30 | 31 | # Format version. 32 | if [[ -n "$version" && "$version" != "system" ]]; then 33 | zformat -f version_formatted "$version_format" "v:$version" 34 | ruby_info[version]="$version_formatted" 35 | fi 36 | fi 37 | 38 | # } 39 | -------------------------------------------------------------------------------- /home/.zprezto/modules/screen/README.md: -------------------------------------------------------------------------------- 1 | GNU Screen 2 | ========== 3 | 4 | Defines [GNU Screen][1] aliases and provides for auto launching it at start-up. 5 | 6 | Settings 7 | -------- 8 | 9 | ### Auto-Start 10 | 11 | Starts a GNU Screen session automatically when Zsh is launched. 12 | 13 | To enable this feature when launching Zsh in a local terminal, add the 14 | following line to *zpreztorc*: 15 | 16 | ```sh 17 | zstyle ':prezto:module:screen:auto-start' local 'yes' 18 | ``` 19 | 20 | To enable this feature when launching Zsh in a SSH connection, add the 21 | following line to *zpreztorc*: 22 | 23 | ```sh 24 | zstyle ':prezto:module:screen:auto-start' remote 'yes' 25 | ``` 26 | 27 | Aliases 28 | ------- 29 | 30 | - `scr` is short for `screen`. 31 | - `scrl` lists sessions/socket directory. 32 | - `scrn` starts a new session. 33 | - `scrr` attaches to a session if one exists or start a new one. 34 | 35 | Authors 36 | ------- 37 | 38 | *The authors of this module should be contacted via the [issue tracker][2].* 39 | 40 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 41 | - [Georges Discry](https://github.com/gdiscry) 42 | 43 | [1]: http://www.gnu.org/software/screen/ 44 | [2]: https://github.com/sorin-ionescu/prezto/issues 45 | -------------------------------------------------------------------------------- /home/.zprezto/modules/screen/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines GNU Screen aliases and provides for auto launching it at start-up. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # Georges Discry 7 | # 8 | 9 | # Return if requirements are not found. 10 | if (( ! $+commands[screen] )); then 11 | return 1 12 | fi 13 | 14 | # 15 | # Auto Start 16 | # 17 | 18 | if [[ -z "$STY" && -z "$EMACS" && -z "$VIM" ]] && ( \ 19 | ( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' remote ) || 20 | ( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \ 21 | ); then 22 | session="$( 23 | screen -list 2> /dev/null \ 24 | | sed '1d;$d' \ 25 | | awk '{print $1}' \ 26 | | head -1)" 27 | 28 | if [[ -n "$session" ]]; then 29 | exec screen -x "$session" 30 | else 31 | exec screen -a -A -U -D -R -m "$SHELL" -l 32 | fi 33 | fi 34 | 35 | # 36 | # Aliases 37 | # 38 | 39 | alias scr='screen' 40 | alias scrl='screen -list' 41 | alias scrn='screen -U -S' 42 | alias scrr='screen -a -A -U -D -R' 43 | -------------------------------------------------------------------------------- /home/.zprezto/modules/ssh/README.md: -------------------------------------------------------------------------------- 1 | SSH 2 | === 3 | 4 | Provides for an easier use of [SSH][1] by setting up [ssh-agent][2]. 5 | 6 | Settings 7 | -------- 8 | 9 | ### Identities 10 | 11 | To load multiple identities, add the following line to *zpreztorc*: 12 | 13 | ```sh 14 | zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_dsa' 'id_github' 15 | ``` 16 | 17 | Authors 18 | ------- 19 | 20 | *The authors of this module should be contacted via the [issue tracker][3].* 21 | 22 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 23 | 24 | [1]: http://www.openssh.com 25 | [2]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-agent&sektion=1 26 | [3]: https://github.com/sorin-ionescu/prezto/issues 27 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/.gitattributes: -------------------------------------------------------------------------------- 1 | .revision-hash export-subst 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/.gitignore: -------------------------------------------------------------------------------- 1 | *.zwc* 2 | .pc/ 3 | docs/all.md 4 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/.revision-hash: -------------------------------------------------------------------------------- 1 | 0a04102b5ac8e46a056509df7f1247aa24399a8f 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | sudo: required 3 | 4 | env: 5 | - ZSH=4.3.11 6 | - ZSH=4.3.12 7 | - ZSH=4.3.13 8 | - ZSH=4.3.14 9 | - ZSH=4.3.15 10 | - ZSH=4.3.16 11 | - ZSH=4.3.17 12 | - ZSH=5.0.0 13 | - ZSH=5.0.1 14 | - ZSH=5.0.2 15 | - ZSH=5.0.3 16 | - ZSH=5.0.4 17 | - ZSH=5.0.5 18 | - ZSH=5.0.6 19 | - ZSH=5.0.7 20 | - ZSH=5.0.8 21 | - ZSH=5.1 22 | - ZSH=5.1.1 23 | - ZSH=5.2 24 | - ZSH=5.3 25 | - ZSH=5.3.1 26 | - ZSH=5.4 27 | - ZSH=5.4.1 28 | - ZSH=master 29 | 30 | script: docker run -v $PWD:/work -w /work zshusers/zsh-${ZSH} /bin/sh -c 'make test' 31 | 32 | notifications: 33 | webhooks: 34 | urls: 35 | - https://webhooks.gitter.im/e/367e241cdea60cb2070b 36 | on_success: change 37 | on_failure: always 38 | on_start: never 39 | irc: 40 | channels: 41 | - "chat.freenode.net#zsh-syntax-highlighting" 42 | on_success: change 43 | on_failure: always 44 | on_start: never 45 | use_notice: true 46 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/.version: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/docs/highlighters/brackets.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters / brackets 2 | ------------------------------------------------- 3 | 4 | This is the `brackets` highlighter, that highlights brackets and parentheses, and 5 | matches them. 6 | 7 | 8 | ### How to tweak it 9 | 10 | This highlighter defines the following styles: 11 | 12 | * `bracket-error` - unmatched brackets 13 | * `bracket-level-N` - brackets with nest level N 14 | * `cursor-matchingbracket` - the matching bracket, if cursor is on a bracket 15 | 16 | To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, 17 | for example in `~/.zshrc`: 18 | 19 | # To define styles for nested brackets up to level 4 20 | ZSH_HIGHLIGHT_STYLES[bracket-level-1]='fg=blue,bold' 21 | ZSH_HIGHLIGHT_STYLES[bracket-level-2]='fg=red,bold' 22 | ZSH_HIGHLIGHT_STYLES[bracket-level-3]='fg=yellow,bold' 23 | ZSH_HIGHLIGHT_STYLES[bracket-level-4]='fg=magenta,bold' 24 | 25 | The syntax for values is the same as the syntax of "types of highlighting" of 26 | the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)` 27 | manual page][zshzle-Character-Highlighting]. 28 | 29 | [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/docs/highlighters/cursor.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters / cursor 2 | ----------------------------------------------- 3 | 4 | This is the `cursor` highlighter, that highlights the cursor. 5 | 6 | 7 | ### How to tweak it 8 | 9 | This highlighter defines the following styles: 10 | 11 | * `cursor` - the style for the current cursor position 12 | 13 | To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, 14 | for example in `~/.zshrc`: 15 | 16 | ZSH_HIGHLIGHT_STYLES[cursor]='bg=blue' 17 | 18 | The syntax for values is the same as the syntax of "types of highlighting" of 19 | the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)` 20 | manual page][zshzle-Character-Highlighting]. 21 | 22 | [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting 23 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/docs/highlighters/line.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters / line 2 | --------------------------------------------- 3 | 4 | This is the `line` highlighter, that highlights the whole line. 5 | 6 | 7 | ### How to tweak it 8 | 9 | This highlighter defines the following styles: 10 | 11 | * `line` - the style for the whole line 12 | 13 | To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, 14 | for example in `~/.zshrc`: 15 | 16 | ZSH_HIGHLIGHT_STYLES[line]='bold' 17 | 18 | The syntax for values is the same as the syntax of "types of highlighting" of 19 | the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)` 20 | manual page][zshzle-Character-Highlighting]. 21 | 22 | [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting 23 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/docs/highlighters/pattern.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters / pattern 2 | ------------------------------------------------ 3 | 4 | This is the `pattern` highlighter, that highlights user-defined patterns. 5 | 6 | 7 | ### How to tweak it 8 | 9 | To use this highlighter, associate patterns with styles in the 10 | `ZSH_HIGHLIGHT_PATTERNS` associative array, for example in `~/.zshrc`: 11 | 12 | # To have commands starting with `rm -rf` in red: 13 | ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') 14 | 15 | The syntax for values is the same as the syntax of "types of highlighting" of 16 | the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)` 17 | manual page][zshzle-Character-Highlighting]. 18 | 19 | [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/docs/highlighters/root.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters / root 2 | --------------------------------------------- 3 | 4 | This is the `root` highlighter, that highlights the whole line if the current 5 | user is root. 6 | 7 | 8 | ### How to tweak it 9 | 10 | This highlighter defines the following styles: 11 | 12 | * `root` - the style for the whole line if the current user is root. 13 | 14 | To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, 15 | for example in `~/.zshrc`: 16 | 17 | ZSH_HIGHLIGHT_STYLES[root]='bg=red' 18 | 19 | The syntax for values is the same as the syntax of "types of highlighting" of 20 | the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)` 21 | manual page][zshzle-Character-Highlighting]. 22 | 23 | [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting 24 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/README.md: -------------------------------------------------------------------------------- 1 | zsh-syntax-highlighting / highlighters 2 | ====================================== 3 | 4 | Navigate into the individual highlighters' documentation to see 5 | what styles (`$ZSH_HIGHLIGHT_STYLES` keys) each highlighter defines. 6 | 7 | Refer to the [documentation on highlighters](../docs/highlighters.md) for further 8 | information. 9 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/brackets/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/brackets.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/cursor/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/cursor.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/line/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/line.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/main/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/main.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/pattern/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/pattern.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/highlighters/root/README.md: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../.zprezto/modules/syntax-highlighting/external/docs/highlighters/root.md -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after1-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after1-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after1.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after2-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after2-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after2.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after3-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after3-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/after3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/after3.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before1-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before1-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before1.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before2-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before2-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before2.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before3-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before3-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/before3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/before3.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/preview-smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/preview-smaller.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/images/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/.zprezto/modules/syntax-highlighting/external/images/preview.png -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/release.md: -------------------------------------------------------------------------------- 1 | # Release procedure (for developers): 2 | 3 | - For minor (A.B.0) releases: 4 | - Check whether the release uses any not-yet-released zsh features 5 | - Check open issues and outstanding pull requests 6 | - Confirm `make test` passes 7 | - check with multiple zsh versions 8 | - Update changelog.md 9 | `tig --abbrev=12 --abbrev-commit 0.4.1..upstream/master` 10 | - Remove `-dev` suffix from `./.version`; 11 | Commit that using `git commit -m "Tag version $(<.version)."`; 12 | Tag it using `git tag -m "Tag version $(<.version)"`; 13 | Increment `./.version` and restore the `-dev` suffix; 14 | Commit that using 'git commit -C b5c30ae52638e81a38fe5329081c5613d7bd6ca5'. 15 | - Push with `git push && git push --tags` 16 | - Notify downstreams (OS packages) 17 | - anitya should autodetect the tag 18 | - Update /topic on IRC 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/external/zsh-syntax-highlighting.plugin.zsh: -------------------------------------------------------------------------------- 1 | 0=${(%):-%N} 2 | source ${0:A:h}/zsh-syntax-highlighting.zsh 3 | -------------------------------------------------------------------------------- /home/.zprezto/modules/syntax-highlighting/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Integrates zsh-syntax-highlighting into Prezto. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Return if requirements are not found. 9 | if ! zstyle -t ':prezto:module:syntax-highlighting' color; then 10 | return 1 11 | fi 12 | 13 | # Source module files. 14 | source "${0:h}/external/zsh-syntax-highlighting.zsh" || return 1 15 | 16 | # Set highlighters. 17 | zstyle -a ':prezto:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS' 18 | if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then 19 | ZSH_HIGHLIGHT_HIGHLIGHTERS=(main) 20 | fi 21 | 22 | # Set highlighting styles. 23 | typeset -A syntax_highlighting_styles 24 | zstyle -a ':prezto:module:syntax-highlighting' styles 'syntax_highlighting_styles' 25 | for syntax_highlighting_style in "${(k)syntax_highlighting_styles[@]}"; do 26 | ZSH_HIGHLIGHT_STYLES[$syntax_highlighting_style]="$syntax_highlighting_styles[$syntax_highlighting_style]" 27 | done 28 | unset syntax_highlighting_style{s,} 29 | 30 | # Set pattern highlighting styles. 31 | typeset -A syntax_pattern_styles 32 | zstyle -a ':prezto:module:syntax-highlighting' pattern 'syntax_pattern_styles' 33 | for syntax_pattern_style in "${(k)syntax_pattern_styles[@]}"; do 34 | ZSH_HIGHLIGHT_PATTERNS[$syntax_pattern_style]="$syntax_pattern_styles[$syntax_pattern_style]" 35 | done 36 | unset syntax_pattern_style{s,} 37 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_cdls_popdls_pushdls: -------------------------------------------------------------------------------- 1 | #compdef cdls popdls pushdls 2 | #autoload 3 | 4 | # 5 | # Completes cdls, popdls, and pushdls. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _cd 12 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_dut: -------------------------------------------------------------------------------- 1 | #compdef dut 2 | #autoload 3 | 4 | # 5 | # Completes dut. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _du 12 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_mkdcd: -------------------------------------------------------------------------------- 1 | #compdef mkdcd 2 | #autoload 3 | 4 | # 5 | # Completes mkdcd. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | local expl 12 | 13 | _wanted directories expl 'directory' _path_files -/ || _message 'directory' 14 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_noremoteglob: -------------------------------------------------------------------------------- 1 | #compdef noremoteglob 2 | #autoload 3 | 4 | # 5 | # Completes noremoteglob. 6 | # 7 | # Authors: 8 | # Indrajit Raychaudhuri 9 | # 10 | 11 | _precommand 12 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_prep: -------------------------------------------------------------------------------- 1 | #compdef prep 2 | #autoload 3 | 4 | # 5 | # Completes prep. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _arguments \ 12 | '-i[ignore case]' \ 13 | '-m[^ and $ match the start and the end of a line]' \ 14 | '-s[. matches newline]' \ 15 | '-v[invert match]' \ 16 | '-x[ignore whitespace and comments]' \ 17 | '1::pattern:' \ 18 | '2::files:_files' && return 0 19 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/_psub: -------------------------------------------------------------------------------- 1 | #compdef psub 2 | #autoload 3 | 4 | # 5 | # Completes psub. 6 | # 7 | # Authors: 8 | # Sorin Ionescu 9 | # 10 | 11 | _arguments \ 12 | '-g[match globally]' \ 13 | '-i[ignore case]' \ 14 | '-m[^ and $ match the start and the end of a line]' \ 15 | '-s[. matches newline]' \ 16 | '-x[ignore whitespace and comments]' \ 17 | '1::pattern:' \ 18 | '2::replacement:' \ 19 | '3::files:_files' && return 0 20 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/diff: -------------------------------------------------------------------------------- 1 | # 2 | # Highlights diff output. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | function diff { 9 | if zstyle -t ':prezto:module:utility:diff' color \ 10 | && (( $+commands[colordiff] )); then 11 | command colordiff "$@" 12 | else 13 | command diff "$@" 14 | fi 15 | } 16 | 17 | diff "$@" 18 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/dut: -------------------------------------------------------------------------------- 1 | # 2 | # Displays the grand total disk usage using human readable units. 3 | # 4 | # Authors: 5 | # Suraj N. Kurapati 6 | # Sorin Ionescu 7 | # 8 | 9 | function dut { 10 | (( $# == 0 )) && set -- * 11 | 12 | if grep -q -i 'GNU' < <(du --version 2>&1); then 13 | du -khsc "$@" | sort -h -r 14 | else 15 | local line size name 16 | local -a record 17 | 18 | while IFS=$'\n' read line; do 19 | record=(${(z)line}) 20 | size="$(($record[1] / 1024.0))" 21 | name="$record[2,-1]" 22 | printf "%9.1LfM %s\n" "$size" "$name" 23 | done < <(du -kcs "$@") | sort -n -r 24 | fi 25 | } 26 | 27 | dut "$@" 28 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/make: -------------------------------------------------------------------------------- 1 | # 2 | # Highlights make output. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | function make { 9 | if zstyle -t ':prezto:module:utility:make' color; then 10 | if (( $+commands[colormake] )); then 11 | colormake "$@" 12 | else 13 | command make "$@" 14 | fi 15 | else 16 | command make "$@" 17 | fi 18 | } 19 | 20 | make "$@" 21 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/prep: -------------------------------------------------------------------------------- 1 | # 2 | # Provides a grep-like pattern search. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function prep { 9 | 10 | local usage pattern modifiers invert 11 | 12 | usage="$( 13 | cat <&2 34 | print "$usage" >&2 35 | return 1 36 | ;; 37 | ([?]) 38 | print "$0: unknown option: $OPTARG" >&2 39 | print "$usage" >&2 40 | return 1 41 | ;; 42 | esac 43 | done 44 | shift $(( $OPTIND - 1 )) 45 | 46 | if (( $# < 1 )); then 47 | print "$usage" >&2 48 | return 1 49 | fi 50 | 51 | pattern="$1" 52 | shift 53 | 54 | perl -n -l -e "print if ${invert:+not} m/${pattern//\//\\/}/${modifiers}" "$@" 55 | 56 | # } 57 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/psub: -------------------------------------------------------------------------------- 1 | # 2 | # Provides a sed-like pattern substitution. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # function psub { 9 | 10 | local usage pattern replacement modifiers 11 | 12 | usage="$( 13 | cat <&2 34 | print "$usage" >&2 35 | return 1 36 | ;; 37 | ([?]) 38 | print "$0: unknown option: $OPTARG" >&2 39 | print "$usage" >&2 40 | return 1 41 | ;; 42 | esac 43 | done 44 | shift $(( $OPTIND - 1 )) 45 | 46 | if (( $# < 2 )); then 47 | print "$usage" >&2 48 | return 1 49 | fi 50 | 51 | pattern="$1" 52 | replacement="$2" 53 | repeat 2 shift 54 | 55 | perl -i'.orig' -n -l -e "s/${pattern//\//\\/}/${replacement//\//\\/}/${modifiers}; print" "$@" 56 | 57 | # } 58 | -------------------------------------------------------------------------------- /home/.zprezto/modules/utility/functions/wdiff: -------------------------------------------------------------------------------- 1 | # 2 | # Highlights wdiff output. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | function wdiff { 9 | if zstyle -t ':prezto:module:utility:wdiff' color; then 10 | if (( $+commands[wdiff] )); then 11 | command wdiff \ 12 | --avoid-wraps \ 13 | --start-delete="$(print -n $FG[red])" \ 14 | --end-delete="$(print -n $FG[none])" \ 15 | --start-insert="$(print -n $FG[green])" \ 16 | --end-insert="$(print -n $FG[none])" \ 17 | "$@" \ 18 | | sed 's/^\(@@\( [+-][[:digit:]]*,[[:digit:]]*\)\{2\} @@\)$/;5;6m\10m/g' 19 | elif (( $+commands[git] )); then 20 | command git --no-pager diff --color=auto --no-ext-diff --no-index --color-words "$@" 21 | else 22 | command wdiff "$@" 23 | fi 24 | else 25 | command wdiff "$@" 26 | fi 27 | } 28 | 29 | wdiff "$@" 30 | -------------------------------------------------------------------------------- /home/.zprezto/modules/wakeonlan/README.md: -------------------------------------------------------------------------------- 1 | Wake-on-LAN 2 | =========== 3 | 4 | This module provides a wrapper around the [wakeonlan][1] tool. 5 | 6 | Usage 7 | ----- 8 | 9 | To use this wrapper, create the *~/.wakeonlan* directory, and place in it one 10 | file for each device you would like to be able to wake. Give the file a name 11 | that describes the device, such as its hostname. 12 | 13 | Each file should contain a line with the MAC address of the target device and 14 | the network broadcast address. For instance, there might be a file 15 | *~/.wakeonlan/leto* with the following contents: 16 | 17 | ```conf 18 | 00:11:22:33:44:55:66 192.168.0.255 19 | ``` 20 | 21 | To wake that device, use the following command: 22 | 23 | ```sh 24 | $ wake leto 25 | ``` 26 | 27 | For more information on the configuration file format, read the 28 | [wakeonlan man page][2]. 29 | 30 | Authors 31 | ------- 32 | 33 | *The authors of this module should be contacted via [issue tracker][3].* 34 | 35 | - [Paul Dann](https://github.com/giddie) 36 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 37 | 38 | [1]: http://gsd.di.uminho.pt/jpo/software/wakeonlan/ 39 | [2]: http://man.cx/wakeonlan 40 | [3]: https://github.com/sorin-ionescu/prezto/issues 41 | -------------------------------------------------------------------------------- /home/.zprezto/modules/wakeonlan/functions/_wake: -------------------------------------------------------------------------------- 1 | #compdef wake 2 | #autoload 3 | 4 | # 5 | # Completes wake. 6 | # 7 | # Authors: 8 | # Paul Gideon Dann 9 | # Sorin Ionescu 10 | # 11 | 12 | _arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0 13 | -------------------------------------------------------------------------------- /home/.zprezto/modules/wakeonlan/functions/wake: -------------------------------------------------------------------------------- 1 | # 2 | # Wakes devices via wakeonlan. 3 | # 4 | # Authors: 5 | # Paul Gideon Dann 6 | # Sorin Ionescu 7 | # 8 | 9 | # function wake { 10 | 11 | local config_file="$HOME/.wakeonlan/$1" 12 | if [[ ! -s "$config_file" ]]; then 13 | print "$0: invalid device file: $1" >&2 14 | return 1 15 | fi 16 | 17 | if (( ! $+commands[wakeonlan] )); then 18 | print "$0: command not found: wakeonlan" >&2 19 | return 1 20 | fi 21 | 22 | wakeonlan -f "$config_file" 23 | 24 | # } 25 | -------------------------------------------------------------------------------- /home/.zprezto/modules/yum/README.md: -------------------------------------------------------------------------------- 1 | Yum 2 | === 3 | 4 | Defines [yum][1] aliases. 5 | 6 | Aliases 7 | ------- 8 | 9 | - `yumc` removes package(s) and leaves. 10 | - `yumi` installs package(s). 11 | - `yumh` displays history. 12 | - `yuml` lists packages. 13 | - `yumL` lists installed packages. 14 | - `yumq` displays package information. 15 | - `yumr` removes package(s). 16 | - `yums` searches for a package. 17 | - `yumu` updates packages. 18 | - `yumU` upgrades packages. 19 | 20 | Authors 21 | ------- 22 | 23 | *The authors of this module should be contacted via the [issue tracker][2].* 24 | 25 | - [Sorin Ionescu](https://github.com/sorin-ionescu) 26 | 27 | [1]: http://yum.baseurl.org 28 | [2]: https://github.com/sorin-ionescu/prezto/issues 29 | -------------------------------------------------------------------------------- /home/.zprezto/modules/yum/init.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Defines yum aliases. 3 | # 4 | # Authors: 5 | # Simon 6 | # Sorin Ionescu 7 | # 8 | 9 | # Return if requirements are not found. 10 | if (( ! $+commands[yum] )); then 11 | return 1 12 | fi 13 | 14 | # 15 | # Aliases 16 | # 17 | 18 | alias yumc='sudo yum clean all' # Cleans the cache. 19 | alias yumh='yum history' # Displays history. 20 | alias yumi='sudo yum install' # Installs package(s). 21 | alias yuml='yum list' # Lists packages. 22 | alias yumL='yum list installed' # Lists installed packages. 23 | alias yumq='yum info' # Displays package information. 24 | alias yumr='sudo yum remove' # Removes package(s). 25 | alias yums='yum search' # Searches for a package. 26 | alias yumu='sudo yum update' # Updates packages. 27 | alias yumU='sudo yum upgrade' # Upgrades packages. 28 | -------------------------------------------------------------------------------- /home/.zprezto/runcoms/zlogin: -------------------------------------------------------------------------------- 1 | # 2 | # Executes commands at login post-zshrc. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Execute code that does not affect the current session in the background. 9 | { 10 | # Compile the completion dump to increase startup speed. 11 | zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" 12 | if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then 13 | zcompile "$zcompdump" 14 | fi 15 | } &! 16 | 17 | # Execute code only if STDERR is bound to a TTY. 18 | [[ -o INTERACTIVE && -t 2 ]] && { 19 | 20 | # Print a random, hopefully interesting, adage. 21 | if (( $+commands[fortune] )); then 22 | fortune -s 23 | print 24 | fi 25 | 26 | } >&2 27 | -------------------------------------------------------------------------------- /home/.zprezto/runcoms/zlogout: -------------------------------------------------------------------------------- 1 | # 2 | # Executes commands at logout. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Execute code only if STDERR is bound to a TTY. 9 | [[ -o INTERACTIVE && -t 2 ]] && { 10 | 11 | # Print the message. 12 | cat <<-EOF 13 | 14 | Thank you. Come again! 15 | -- Dr. Apu Nahasapeemapetilon 16 | EOF 17 | 18 | } >&2 19 | -------------------------------------------------------------------------------- /home/.zprezto/runcoms/zprofile: -------------------------------------------------------------------------------- 1 | # 2 | # Executes commands at login pre-zshrc. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # 9 | # Browser 10 | # 11 | 12 | if [[ "$OSTYPE" == darwin* ]]; then 13 | export BROWSER='open' 14 | fi 15 | 16 | # 17 | # Editors 18 | # 19 | 20 | export EDITOR='nano' 21 | export VISUAL='nano' 22 | export PAGER='less' 23 | 24 | # 25 | # Language 26 | # 27 | 28 | if [[ -z "$LANG" ]]; then 29 | export LANG='en_US.UTF-8' 30 | fi 31 | 32 | # 33 | # Paths 34 | # 35 | 36 | # Ensure path arrays do not contain duplicates. 37 | typeset -gU cdpath fpath mailpath path 38 | 39 | # Set the list of directories that cd searches. 40 | # cdpath=( 41 | # $cdpath 42 | # ) 43 | 44 | # Set the list of directories that Zsh searches for programs. 45 | path=( 46 | /usr/local/{bin,sbin} 47 | $path 48 | ) 49 | 50 | # 51 | # Less 52 | # 53 | 54 | # Set the default Less options. 55 | # Mouse-wheel scrolling has been disabled by -X (disable screen clearing). 56 | # Remove -X and -F (exit if the content fits on one screen) to enable it. 57 | export LESS='-F -g -i -M -R -S -w -X -z-4' 58 | 59 | # Set the Less input preprocessor. 60 | # Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. 61 | if (( $#commands[(i)lesspipe(|.sh)] )); then 62 | export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" 63 | fi 64 | -------------------------------------------------------------------------------- /home/.zprezto/runcoms/zshenv: -------------------------------------------------------------------------------- 1 | # 2 | # Defines environment variables. 3 | # 4 | # Authors: 5 | # Sorin Ionescu 6 | # 7 | 8 | # Ensure that a non-login, non-interactive shell has a defined environment. 9 | if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then 10 | source "${ZDOTDIR:-$HOME}/.zprofile" 11 | fi 12 | 13 | if [[ -s "$HOME/.zshenv.secret" ]]; then 14 | source "$HOME/.zshenv.secret" 15 | fi 16 | 17 | 18 | export GOPATH=$HOME/go 19 | export ANDROID_HOME=$HOME/Library/Android/sdk 20 | 21 | export PATH="$GOPATH/bin:$PATH" 22 | export PATH="/usr/bin:$PATH" 23 | export PATH="/usr/local/bin:$PATH" 24 | export PATH="/usr/local/opt/mysql/bin:$PATH" 25 | export PATH="$HOME/.rbenv/bin:$PATH" 26 | export PATH=$HOME/Library/Android/sdk/platform-tools:$PATH 27 | export PATH=$HOME/Library/Android/sdk/tools:$PATH 28 | export PATH="$HOME/.ndenv/bin:$PATH" 29 | export PATH="$HOME/flutter/bin:$PATH" 30 | export PATH="$HOME/bin:$PATH" 31 | 32 | export EDITOR='vim' 33 | export VISUAL='vim' 34 | export PAGER='less' 35 | export GREP_OPTIONS='--color=auto' 36 | 37 | export SWIFT_BUILD_DIR="$HOME/develop/library/swift-source-code/build/Ninja-DebugAssert/swift-macosx-x86_64" 38 | # https://teratail.com/questions/111371 39 | export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES 40 | -------------------------------------------------------------------------------- /home/bin/bulk_set_github_actions_secret_for_claud: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | echo 'cd to ~/bin' 5 | cd ~/bin 6 | 7 | echo 'Exec all for each repository' 8 | ./set_github_actions_secret_for_claud bannzai/Focus 9 | ./set_github_actions_secret_for_claud bannzai/bigquery-analytics-to-github-issue 10 | ./set_github_actions_secret_for_claud bannzai/QuickIssue 11 | ./set_github_actions_secret_for_claud bannzai/medicalarm 12 | ./set_github_actions_secret_for_claud bannzai/importion 13 | ./set_github_actions_secret_for_claud bannzai/ReplAI 14 | ./set_github_actions_secret_for_claud bannzai/Audiblog 15 | ./set_github_actions_secret_for_claud bannzai/.bin 16 | -------------------------------------------------------------------------------- /home/bin/mitm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | usage() { 5 | cat << EOF >&2 6 | mitm is shortcut function for launch mitm server to localhost 7 | Usage: 8 | $(basename $0) [] 9 | Args: 10 | -s|--service service is a network protocol name. (e.g VPN, default is Wi-Fi 11 | -h|--help displaying help message 12 | EOF 13 | } 14 | 15 | run() { 16 | sudo networksetup -setwebproxy $SERVICE_NAME localhost 8090 17 | sudo networksetup -setsecurewebproxy $SERVICE_NAME localhost 8090 18 | sudo networksetup -setwebproxystate $SERVICE_NAME on 19 | sudo networksetup -setsecurewebproxystate $SERVICE_NAME on 20 | mitmproxy --anticache -p 8090 21 | 22 | sudo networksetup -setwebproxystate $SERVICE_NAME off 23 | sudo networksetup -setsecurewebproxystate $SERVICE_NAME off 24 | } 25 | 26 | set +u 27 | SERVICE_NAME=${SERVICE_NAME:-"Wi-Fi"} 28 | set -u 29 | 30 | if [ $# -eq 0 ]; then 31 | run 32 | exit 0 33 | fi 34 | 35 | while [ $# -ne 0 ]; do 36 | case $1 in 37 | -s|--service) 38 | SERVICE_NAME=$2 39 | shift 2 40 | ;; 41 | -h|--help) 42 | usage 43 | exit 1 44 | ;; 45 | *) 46 | ;; 47 | esac 48 | done 49 | 50 | run 51 | -------------------------------------------------------------------------------- /home/bin/set_git_user: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | git config --local user.email "star.kojiki@gmail.com" 5 | git config --local user.name "bannzai" 6 | -------------------------------------------------------------------------------- /home/xctemplates/SwiftFile.xctemplate/TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/xctemplates/SwiftFile.xctemplate/TemplateIcon.png -------------------------------------------------------------------------------- /home/xctemplates/SwiftFile.xctemplate/TemplateIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/xctemplates/SwiftFile.xctemplate/TemplateIcon@2x.png -------------------------------------------------------------------------------- /home/xctemplates/SwiftFile.xctemplate/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Kind 6 | Xcode.IDEFoundation.TextSubstitutionFileTemplateKind 7 | Name 8 | Swift File 9 | Description 10 | Default Swift File 11 | Summary 12 | Use it for empty swift file 13 | SortOrder 14 | 100 15 | DefaultCompletionName 16 | File 17 | 18 | 19 | -------------------------------------------------------------------------------- /home/xctemplates/SwiftFile.xctemplate/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | -------------------------------------------------------------------------------- /home/xctemplates/View.xctemplate/TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/xctemplates/View.xctemplate/TemplateIcon.png -------------------------------------------------------------------------------- /home/xctemplates/View.xctemplate/TemplateIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/castle/0a04102b5ac8e46a056509df7f1247aa24399a8f/home/xctemplates/View.xctemplate/TemplateIcon@2x.png -------------------------------------------------------------------------------- /home/xctemplates/View.xctemplate/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Kind 6 | Xcode.IDEFoundation.TextSubstitutionFileTemplateKind 7 | Name 8 | SwiftUI Component 9 | Description 10 | SwiftUI Component 11 | Summary 12 | Use it for SwiftUI Component 13 | SortOrder 14 | 300 15 | DefaultCompletionName 16 | Component 17 | 18 | 19 | -------------------------------------------------------------------------------- /home/xctemplates/View.xctemplate/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | struct ___FILEBASENAMEASIDENTIFIER___: View { 4 | var body: some View { 5 | Text("Hello World!") 6 | } 7 | } 8 | 9 | struct ___FILEBASENAMEASIDENTIFIER___Previews: PreviewProvider { 10 | static var previews: some View { 11 | Group { 12 | ___FILEBASENAMEASIDENTIFIER___() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /home/xctemplates/copy_templates.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | cwd=$(cd $(dirname $0); pwd) 5 | mkdir -p ~/Library/Developer/Xcode/Templates 6 | for file in ${cwd}/*.xctemplate; do 7 | ln -fs $file ~/Library/Developer/Xcode/Templates/ 8 | done 9 | -------------------------------------------------------------------------------- /scripts/setup/fzf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | git clone https://github.com/junegunn/fzf.git ~/.fzf 6 | echo 7 | ~/.fzf/install 8 | -------------------------------------------------------------------------------- /scripts/setup/prezto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | set -eu 3 | set -o pipefail 4 | 5 | echo "begin prezto setup" 6 | setopt EXTENDED_GLOB 7 | PREZTO_DIR="$HOME/.homesick/repos/castle/home/.zprezto" 8 | ls $PREZTO_DIR 9 | for rcfile in $PREZTO_DIR/runcoms/^README.md(.N); do 10 | echo "mv $HOME/.${rcfile:t} $HOME/.${rcfile:t}.bk" 11 | set +e 12 | mv "$HOME/.${rcfile:t}" "$HOME/.${rcfile:t}.bk" 13 | set -e 14 | echo "ln -s $rcfile for $HOME/.${rcfile:t}" 15 | ln -s $rcfile "$HOME/.${rcfile:t}" 16 | done 17 | echo "end prezto setup" 18 | 19 | touch ~/.zshrc.local 20 | -------------------------------------------------------------------------------- /scripts/setup/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | COMMANDS=( 4 | "go get github.com/golang/mock/gomock" 5 | "go get -u github.com/golang/dep/cmd/dep" 6 | "go get -u github.com/motemen/gore" 7 | "go get github.com/cweill/gotests/..." 8 | ) 9 | for ((i = 0; i < ${#COMMANDS[@]}; i++)) 10 | do 11 | c="${COMMANDS[$i]}" 12 | echo $c 13 | exec $c & 14 | wait $! 15 | done 16 | 17 | ghq get -p --branch stable --shallow flutter/flutter & 18 | wait $! 19 | 20 | # For VSCode vim plugin 21 | defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false 22 | defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false 23 | 24 | git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm 25 | --------------------------------------------------------------------------------