diff --git a/zsh/.oh-my-zsh/.github/workflows/check-suite.yml b/zsh/.oh-my-zsh/.github/workflows/check-suite.yml new file mode 100644 index 0000000..3a7ad35 --- /dev/null +++ b/zsh/.oh-my-zsh/.github/workflows/check-suite.yml @@ -0,0 +1,36 @@ +name: Check Suite +on: + pull_request: + types: + - opened + - synchronize + branches: + - master + push: + branches: + - master + +jobs: + tests: + name: Run tests + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - name: Set up git repository + uses: actions/checkout@v2 + - name: Install zsh + if: runner.os == 'Linux' + run: sudo apt-get update; sudo apt-get install zsh + - name: Test installer + run: sh ./tools/install.sh + - name: Check syntax + run: | + for file in ./oh-my-zsh.sh \ + ./lib/*.zsh \ + ./plugins/*/*.plugin.zsh \ + ./plugins/*/_* \ + ./themes/*.zsh-theme; do + zsh -n "$file" || return 1 + done diff --git a/zsh/.oh-my-zsh/plugins/codeclimate/README.md b/zsh/.oh-my-zsh/plugins/codeclimate/README.md new file mode 100644 index 0000000..0d712ac --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/codeclimate/README.md @@ -0,0 +1,8 @@ +# codeclimate plugin + +This plugin adds autocompletion for the [`codeclimate` CLI](https://github.com/codeclimate/codeclimate). + +To use it, add `codeclimate` to the plugins array in your zshrc file: +```zsh +plugins=(... codeclimate) +``` diff --git a/zsh/.oh-my-zsh/plugins/dotnet/README.md b/zsh/.oh-my-zsh/plugins/dotnet/README.md new file mode 100644 index 0000000..7a6d6a9 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/dotnet/README.md @@ -0,0 +1,21 @@ +# .NET Core CLI plugin + +This plugin provides completion and useful aliases for [.NET Core CLI](https://dotnet.microsoft.com/). + +To use it, add `dotnet` to the plugins array in your zshrc file. + +``` +plugins=(... dotnet) +``` + +## Aliases + +| Alias | Command | Description | +|-------|--------------|-------------------------------------------------------------------| +| dn | dotnet new | Create a new .NET project or file. | +| dr | dotnet run | Build and run a .NET project output. | +| dt | dotnet test | Run unit tests using the test runner specified in a .NET project. | +| ds | dotnet sln | Modify Visual Studio solution files. | +| da | dotnet add | Add a package or reference to a .NET project. | +| dp | dotnet pack | Create a NuGet package. | +| dng | dotnet nuget | Provides additional NuGet commands. | \ No newline at end of file diff --git a/zsh/.oh-my-zsh/plugins/dotnet/dotnet.plugin.zsh b/zsh/.oh-my-zsh/plugins/dotnet/dotnet.plugin.zsh new file mode 100644 index 0000000..8b9a45a --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/dotnet/dotnet.plugin.zsh @@ -0,0 +1,117 @@ +# --------------------------------------------------------------------- # +# Aliases and Completions for .NET Core (https://dotnet.microsoft.com/) # +# Author: Shaun Tabone (https://github.com/xontab) # +# --------------------------------------------------------------------- # + +# Helper function to cache and load completions +local cache_base_path="${ZSH_CACHE_DIR}/dotnet_" +_dotnet_cache_completion() { + local cache="${cache_base_path}$(echo $1)_completion" + if [[ ! -f $cache ]]; then + $2 $cache + fi + + [[ -f $cache ]] && cat $cache +} + +_dotnet_cache_completion_cleanup() { + local cache="${cache_base_path}$(echo $1)_completion" + rm -f $cache +} + +# --------------------------------------------------------------------- # +# dotnet new # +# ALIAS: dn # +# --------------------------------------------------------------------- # +_dotnet_new_completion() { + if [ $commands[dotnet] ]; then + dotnet new -l | tail -n +21 | sed 's/ \+/:/g' | cut -d : -f 2 >$1 + fi +} + +_dotnet_new_completion_cached() { + _dotnet_cache_completion 'new' _dotnet_new_completion +} + +_dotnet_cache_completion_cleanup 'new' + +alias dn='dotnet new' + +# --------------------------------------------------------------------- # +# dotnet # +# --------------------------------------------------------------------- # +_dotnet() { + if [ $CURRENT -eq 2 ]; then + _arguments \ + '--diagnostics[Enable diagnostic output.]' \ + '--help[Show command line help.]' \ + '--info[Display .NET Core information.]' \ + '--list-runtimes[Display the installed runtimes.]' \ + '--list-sdks[Display the installed SDKs.]' \ + '--version[Display .NET Core SDK version in use.]' + + _values \ + 'add[Add a package or reference to a .NET project.]' \ + 'build[Build a .NET project.]' \ + 'build-server[Interact with servers started by a build.]' \ + 'clean[Clean build outputs of a .NET project.]' \ + 'help[Show command line help.]' \ + 'list[List project references of a .NET project.]' \ + 'msbuild[Run Microsoft Build Engine (MSBuild) commands.]' \ + 'new[Create a new .NET project or file.]' \ + 'nuget[Provides additional NuGet commands.]' \ + 'pack[Create a NuGet package.]' \ + 'publish[Publish a .NET project for deployment.]' \ + 'remove[Remove a package or reference from a .NET project.]' \ + 'restore[Restore dependencies specified in a .NET project.]' \ + 'run[Build and run a .NET project output.]' \ + 'sln[Modify Visual Studio solution files.]' \ + 'store[Store the specified assemblies in the runtime package store.]' \ + 'test[Run unit tests using the test runner specified in a .NET project.]' \ + 'tool[Install or manage tools that extend the .NET experience.]' \ + 'vstest[Run Microsoft Test Engine (VSTest) commands.]' \ + 'dev-certs[Create and manage development certificates.]' \ + 'fsi[Start F# Interactive / execute F# scripts.]' \ + 'sql-cache[SQL Server cache command-line tools.]' \ + 'user-secrets[Manage development user secrets.]' \ + 'watch[Start a file watcher that runs a command when files change.]' + return + fi + + if [ $CURRENT -eq 3 ]; then + case ${words[2]} in + "new") + compadd -X ".NET Installed Templates" $(_dotnet_new_completion_cached) + return + ;; + "sln") + _values \ + 'add[Add one or more projects to a solution file.]' \ + 'list[List all projects in a solution file.]' \ + 'remove[Remove one or more projects from a solution file.]' + return + ;; + "nuget") + _values \ + 'delete[Deletes a package from the server.]' \ + 'locals[Clears or lists local NuGet resources such as http requests cache, packages folder, plugin operations cache or machine-wide global packages folder.]' \ + 'push[Pushes a package to the server and publishes it.]' + return + ;; + esac + fi + + _arguments '*::arguments: _normal' +} + +compdef _dotnet dotnet + +# --------------------------------------------------------------------- # +# Other Aliases # +# --------------------------------------------------------------------- # +alias dr='dotnet run' +alias dt='dotnet test' +alias ds='dotnet sln' +alias da='dotnet add' +alias dp='dotnet pack' +alias dng='dotnet nuget' diff --git a/zsh/.oh-my-zsh/plugins/fastfile/README.md b/zsh/.oh-my-zsh/plugins/fastfile/README.md new file mode 100644 index 0000000..37f5b2f --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/fastfile/README.md @@ -0,0 +1,84 @@ +# Fastfile plugin + +This plugin adds a way to reference certain files or folders used frequently using +a global alias or shortcut. + +To use it, add `fastfile` to the plugins array in your zshrc file: +```zsh +plugins=(... fastfile) +``` + +## Usage + +Example: you access folder `/code/project/backend/database` very frequently. + +First, generate a shortcut with the name `pjdb`: +```zsh +$ fastfile pjdb /code/project/backend/database +``` + +Next time you want to access it, use `§pjdb`. For example: +```zsh +$ cd §pjdb +$ subl §pjdb +``` +where § is the fastfile prefix (see [below](#options) for how to change). + +**Note:** shortcuts with spaces in the name are assigned a global alias +where the spaces have been substituted with underscores (`_`). For example: +a shortcut named `"hello world"` corresponds with `§hello_world`. + + +## Functions + +- `fastfile `: generate a shortcut. + +- `fastfile_print `: prints a shortcut, with the format + ` -> `. + +- `fastfile_ls`: lists all shortcuts. + +- `fastfile_rm `: remove a shortcut. + +- `fastfile_sync`: generates the global aliases for the shortcuts. + + +### Internal functions + +- `fastfile_resolv `: resolves the location of the shortcut + file, i.e., the file in the fastfile directory where the shortcut path + is stored. + +- `fastfile_get `: get the real path of the shortcut. + + +## Aliases + +| Alias | Function | +|--------|------------------| +| ff | `fastfile` | +| ffp | `fastfile_print` | +| ffrm | `fastfile_rm` | +| ffls | `fastfile_ls` | +| ffsync | `fastfile_sync` | + + +## Options + +These are options you can set to change certain parts of the plugin. To change +them, add `=` to your zshrc file, before Oh My Zsh is sourced. +For example: `fastfile_var_prefix='@'`. + +- `fastfile_var_prefix`: prefix for the global aliases created. Controls the prefix of the + created global aliases. + **Default:** `§` (section sign), easy to type in a german keyboard via the combination + [`⇧ Shift`+`3`](https://en.wikipedia.org/wiki/German_keyboard_layout#/media/File:KB_Germany.svg), + or using `⌥ Option`+`6` in macOS. + +- `fastfile_dir`: directory where the fastfile shortcuts are stored. Needs to end + with a trailing slash. + **Default:** `$HOME/.fastfile/`. + +## Author + +- [Karolin Varner](https://github.com/koraa) diff --git a/zsh/.oh-my-zsh/plugins/firewalld/README.md b/zsh/.oh-my-zsh/plugins/firewalld/README.md new file mode 100644 index 0000000..8b5bc74 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/firewalld/README.md @@ -0,0 +1,22 @@ +# FirewallD Plugin + +This plugin adds some aliases and functions for FirewallD using the `firewalld-cmd` command. To use it, add firewalld to your plugins array. + +```zsh +plugins=(... firewalld) +``` + +## Aliases + +| Alias | Command | Description | +| :---- | :----------------------------------------- | :--------------------------- | +| fw | `sudo firewall-cmd` | Shorthand | +| fwr | `sudo firewall-cmd --reload` | Reload current configuration | +| fwp | `sudo firewall-cmd --permanent` | Create permanent rule | +| fwrp | `sudo firewall-cmd --runtime-to-permanent` | Save current configuration | + +## Functions + +| Function | Description | +| :------- | :--------------------------------------------------------- | +| fwl | Lists configuration from all active zones and direct rules | diff --git a/zsh/.oh-my-zsh/plugins/gas/README.md b/zsh/.oh-my-zsh/plugins/gas/README.md new file mode 100644 index 0000000..cd8800e --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/gas/README.md @@ -0,0 +1,9 @@ +# Gas plugin + +This plugin adds autocompletion for the [gas](http://walle.github.com/gas) command, +a utility to manage Git authors. + +To use it, add `gas` to the plugins array of your zshrc file: +```zsh +plugins=(... gas) +``` diff --git a/zsh/.oh-my-zsh/plugins/glassfish/README.md b/zsh/.oh-my-zsh/plugins/glassfish/README.md new file mode 100644 index 0000000..1f4a8be --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/glassfish/README.md @@ -0,0 +1,9 @@ +# glassfish + +The glassfish plugin adds completion for the `asadmin` utility, a command to manage +[Oracle GlassFish](https://docs.oracle.com/cd/E18930_01/html/821-2416/giobi.html) servers. + +To use it, add `glassfish` to the plugins array in your zshrc file: +```zsh +plugins=(... glassfish) +``` diff --git a/zsh/.oh-my-zsh/plugins/gnu-utils/README.md b/zsh/.oh-my-zsh/plugins/gnu-utils/README.md new file mode 100644 index 0000000..f5fa81e --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/gnu-utils/README.md @@ -0,0 +1,38 @@ +# gnu-utils plugin + +This plugin binds GNU coreutils to their default names, so that you don't have +to call them using their prefixed name, which starts with `g`. This is useful +in systems which don't have GNU coreutils installed by default, mainly macOS +or FreeBSD, which use BSD coreutils. + +To use it, add `gnu-utils` to the plugins array in your zshrc file: +```zsh +plugins=(... gnu-utils) +``` + +The plugin works by changing the path that the command hash points to, so +instead of `ls` pointing to `/bin/ls`, it points to wherever `gls` is +installed. + +Since `hash -rf` or `rehash` refreshes the command hashes, it also wraps +`hash` and `rehash` so that the coreutils binding is always done again +after calling these two commands. + +Look at the source code of the plugin to see which GNU coreutils are tried +to rebind. Open an issue if there are some missing. + +## Other methods + +The plugin also documents two other ways to do this: + +1. Using a function wrapper, such that, for example, there exists a function +named `ls` which calls `gls` instead. Since functions have a higher preference +than commands, this ends up calling the GNU coreutil. It has also a higher +preference over shell builtins (`gecho` is called instead of the builtin `echo`). + +2. Using an alias. This has an even higher preference than functions, but they +could be overridden because of a user setting. + +## Author + +- [Sorin Ionescu](https://github.com/sorin-ionescu). diff --git a/zsh/.oh-my-zsh/plugins/hitokoto/README.md b/zsh/.oh-my-zsh/plugins/hitokoto/README.md new file mode 100644 index 0000000..3a8758f --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/hitokoto/README.md @@ -0,0 +1,15 @@ +# hitokoto plugin + +Displays a random quote taken from [hitokoto.cn](https://v1.hitokoto.cn/) + +Created by [Sinrimin](https://github.com/sinrimin) + +## Usage + +Add the plugin to the plugins array in your zshrc file and restart zsh: + +```zsh +plugins=(... hitokoto) +``` + +Then, run `hitokoto` to get a new random quote. diff --git a/zsh/.oh-my-zsh/plugins/hitokoto/hitokoto.plugin.zsh b/zsh/.oh-my-zsh/plugins/hitokoto/hitokoto.plugin.zsh new file mode 100644 index 0000000..8646ebf --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/hitokoto/hitokoto.plugin.zsh @@ -0,0 +1,14 @@ +if ! (( $+commands[curl] )); then + echo "hitokoto plugin needs curl to work" >&2 + return +fi + +function hitokoto { + emulate -L zsh + Q=$(curl -s --connect-timeout 2 "https://v1.hitokoto.cn" | jq -j '.hitokoto+"\t"+.from') + + TXT=$(echo "$Q" | awk -F '\t' '{print $1}') + WHO=$(echo "$Q" | awk -F '\t' '{print $2}') + + [[ -n "$WHO" && -n "$TXT" ]] && print -P "%F{3}${WHO}%f: “%F{5}${TXT}%f”" +} diff --git a/zsh/.oh-my-zsh/plugins/ionic/README.md b/zsh/.oh-my-zsh/plugins/ionic/README.md new file mode 100644 index 0000000..3ec4fc8 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/ionic/README.md @@ -0,0 +1,30 @@ +# Ionic plugin + +This plugin adds completion for the [Ionic CLI](https://ionicframework.com/docs/cli), +as well as some aliases for common Ionic commands. + +To use it, add `ionic` to the plugins array in your zshrc file: + +```zsh +plugins=(... ionic) +``` + +## Aliases + +| Alias | Command | Description | +|-------|--------------------------------------|------------------------------------------------------------------| +| iv | `ionic --version` | Check Ionic version | +| ih | `ionic --help` | Ionic help command | +| ist | `ionic start` | Create a new project | +| ii | `ionic info` | Print system/environment info | +| is | `ionic serve` | Start a local dev server for app dev/testing | +| icba | `ionic cordova build android` | Build web assets and prepare app for android platform targets | +| icbi | `ionic cordova build ios` | Build web assets and prepare app for ios platform targets | +| icra | `ionic cordova run android` | Run an Ionic project on a connected android device | +| icri | `ionic cordova run ios` | Run an Ionic project on a connected ios device | +| icrsa | `ionic cordova resources android` | Automatically create icon and splash screen resources for android| +| icrsi | `ionic cordova resources ios` | Automatically create icon and splash screen resources for ios | +| icpaa | `ionic cordova platform add android` | Add Cordova android platform targets | +| icpai | `ionic cordova platform add ios` | Add Cordova ios platform targets | +| icpra | `ionic cordova platform rm android` | Remove Cordova platform targets | +| icpri | `ionic cordova platform rm ios` | Remove Cordova platform targets | diff --git a/zsh/.oh-my-zsh/plugins/ionic/ionic.plugin.zsh b/zsh/.oh-my-zsh/plugins/ionic/ionic.plugin.zsh new file mode 100644 index 0000000..cf388af --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/ionic/ionic.plugin.zsh @@ -0,0 +1,15 @@ +alias iv="ionic --version" +alias ih="ionic --help" +alias ist="ionic start" +alias ii="ionic info" +alias is="ionic serve" +alias icba="ionic cordova build android" +alias icbi="ionic cordova build ios" +alias icra="ionic cordova run android" +alias icri="ionic cordova run ios" +alias icrsa="ionic cordova resources android" +alias icrsi="ionic cordova resources ios" +alias icpaa="ionic cordova platform add android" +alias icpai="ionic cordova platform add ios" +alias icpra="ionic cordova platform rm android" +alias icpri="ionic cordova platform rm ios" diff --git a/zsh/.oh-my-zsh/plugins/knife/README.md b/zsh/.oh-my-zsh/plugins/knife/README.md new file mode 100644 index 0000000..b167f16 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/knife/README.md @@ -0,0 +1,25 @@ +# knife plugin + +This plugin adds completion for [knife](https://docs.chef.io/knife.html), a command-line tool +to interact with [Chef](https://chef.io), a platform to automate and manage infrastructure via +code. + +To use it, add `knife` to the plugins array in your zshrc file: +```zsh +plugins=(... knife) +``` + +## Options + +- `KNIFE_RELATIVE_PATH`: if set to `true`, the completion script will look for local cookbooks + under the `cookbooks` folder in the chef root directory. It has preference over the other two + options below. **Default:** empty. + +- `KNIFE_COOKBOOK_PATH`: if set, it points to the folder that contains local cookbooks, for + example: `/path/to/my/chef/cookbooks`. **Default:** `cookbook_path` field in `knife.rb` + (see below). + +- `KNIFE_CONF_PATH`: variable pointing to the `knife.rb` configuration file, for example + `/path/to/my/.chef/knife.rb`. Only used if `$KNIFE_COOKBOOK_PATH` isn't set. If it exists, + `$PWD/.chef/knife.rb` is used instead. Otherwise, if it's set, its value is used. + **Default**: `$HOME/.chef/knife.rb`. diff --git a/zsh/.oh-my-zsh/plugins/knife_ssh/README.md b/zsh/.oh-my-zsh/plugins/knife_ssh/README.md new file mode 100644 index 0000000..cb836b7 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/knife_ssh/README.md @@ -0,0 +1,14 @@ +# knife_ssh plugin + +This plugin adds a `knife_ssh` function as well as completion for it, to allow +connecting via ssh to servers managed with [Chef](https://www.chef.io/). + +To use it, add `knife_ssh` to the plugins array in your zshrc file: +```zsh +plugins=(... knife_ssh) +``` + +The plugin creates a cache of the Chef node list via `knife`, and stores it +in `$HOME/.knife_comp~`, when first triggering knife_ssh completion. + +**Requirements:** `knife` has to be installed. diff --git a/zsh/.oh-my-zsh/plugins/magic-enter/README.md b/zsh/.oh-my-zsh/plugins/magic-enter/README.md new file mode 100644 index 0000000..78514c6 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/magic-enter/README.md @@ -0,0 +1,17 @@ +## Magic Enter plugin + +This plugin makes your enter key magical, by binding commonly used commands to it. + +To use it, add `magic-enter` to the plugins array in your zshrc file. You can set the +commands to be run in your .zshrc, before the line containing plugins. If no command +is specified in a git directory, `git status` is executed; in other directories, `ls`. + +```zsh +# defaults +MAGIC_ENTER_GIT_COMMAND='git status -u .' +MAGIC_ENTER_OTHER_COMMAND='ls -lh .' + +plugins=(... magic-enter) +``` + +**Maintainer:** [@dufferzafar](https://github.com/dufferzafar) diff --git a/zsh/.oh-my-zsh/plugins/microk8s/README.md b/zsh/.oh-my-zsh/plugins/microk8s/README.md new file mode 100644 index 0000000..2b4ea20 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/microk8s/README.md @@ -0,0 +1,24 @@ +# MicroK8s plugin + +This plugin provides completion and useful aliases for [MicroK8s](https://microk8s.io/). + +To use it, add `microk8s` to the plugins array in your zshrc file. + +```zsh +plugins=(... microk8s) +``` + +## Aliases + +| Alias | Command | Description | +|-------|------------------|----------------------------------------------------------------------------------------------------------| +| mco | microk8s.config | Shows the Kubernetes config file. | +| mct | microk8s.ctr | Interact with containerd CLI. | +| mdi | microk8s.disable | Disables an addon. | +| me | microk8s.enable | Enables an addon. | +| mh | microk8s.helm | Interact with Helm CLI. | +| mis | microk8s.istio | Interact with Istio CLI. | +| mk | microk8s.kubectl | Interact with Kubernetes CLI. | +| msp | microk8s.stop | Stops all Kubernetes services. | +| mst | microk8s.start | Starts MicroK8s after it is being stopped. | +| msts | microk8s.status | Provides an overview of the MicroK8s state (running / not running) as well as the set of enabled addons. | \ No newline at end of file diff --git a/zsh/.oh-my-zsh/plugins/microk8s/microk8s.plugin.zsh b/zsh/.oh-my-zsh/plugins/microk8s/microk8s.plugin.zsh new file mode 100644 index 0000000..048a9ab --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/microk8s/microk8s.plugin.zsh @@ -0,0 +1,82 @@ +# ---------------------------------------------------------- # +# Aliases and Completions for MicroK8s (https://microk8s.io) # +# Author: Shaun Tabone (https://github.com/xontab) # +# ---------------------------------------------------------- # + +# Helper function to cache and load completions +_microk8s_cache_completion() { + local cache="${ZSH_CACHE_DIR}/microk8s_$(echo $1)_completion" + if [[ ! -f $cache ]]; then + $2 $cache + fi + + [[ -f $cache ]] && source $cache +} + +# ---------------------------------------------------------- # +# microk8s.enable # +# ALIAS: me # +# ---------------------------------------------------------- # +_microk8s_enable_get_command_list() { + microk8s.enable --help | tail -n +7 | awk '{$1=$1;print}' +} + +_microk8s_enable() { + compadd -X "MicroK8s Addons" $(_microk8s_enable_get_command_list) +} + +compdef _microk8s_enable microk8s.enable +alias me='microk8s.enable' + +# ---------------------------------------------------------- # +# microk8s.disable # +# ALIAS: mdi # +# ---------------------------------------------------------- # +_microk8s_disable_get_command_list() { + microk8s.disable --help | tail -n +7 | awk '{$1=$1;print}' +} + +_microk8s_disable() { + compadd -X "MicroK8s Addons" $(_microk8s_disable_get_command_list) +} + +compdef _microk8s_disable microk8s.disable +alias mdi='microk8s.disable' + +# ---------------------------------------------------------- # +# microk8s.kubectl # +# ALIAS: mk # +# ---------------------------------------------------------- # +_microk8s_kubectl_completion() { + if [ $commands[microk8s.kubectl] ]; then + microk8s.kubectl 2>/dev/null >/dev/null && microk8s.kubectl completion zsh | sed 's/__start_kubectl kubectl/__start_kubectl microk8s.kubectl/g' >$1 + fi +} + +_microk8s_cache_completion 'kubectl' _microk8s_kubectl_completion + +alias mk='microk8s.kubectl' + +# ---------------------------------------------------------- # +# microk8s.helm # +# ALIAS: mh # +# ---------------------------------------------------------- # +_microk8s_helm_completion() { + if [ $commands[microk8s.helm] ]; then + microk8s.helm completion zsh | sed 's/__start_helm helm/__start_helm microk8s.helm/g' >$1 + fi +} + +_microk8s_cache_completion 'helm' _microk8s_helm_completion + +alias mh='microk8s.helm' + +# ---------------------------------------------------------- # +# Other Aliases # +# ---------------------------------------------------------- # +alias mco='microk8s.config' +alias mct='microk8s.ctr' +alias mis='microk8s.istio' +alias mst='microk8s.start' +alias msts='microk8s.status' +alias msp='microk8s.stop' diff --git a/zsh/.oh-my-zsh/plugins/otp/README.md b/zsh/.oh-my-zsh/plugins/otp/README.md new file mode 100644 index 0000000..8331fd0 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/otp/README.md @@ -0,0 +1,22 @@ +# otp plugin + +This plugin allows you to create one-time passwords using [`oathtool`](https://www.nongnu.org/oath-toolkit/man-oathtool.html), +able to replace MFA devices. The oathtool key is kept in a GPG-encrypted file so the codes +can only be generated by a user able to decrypt it. + +To use it, add `otp` to the plugins array in your zshrc file: +```zsh +plugins=(... otp) +``` + +Provided aliases: + +- `otp_add_device`: creates a new encrypted storage for an oathtool key and stores it + on the disk. For encrypting the key, it will ask for a GPG user ID (your GPG key's + email address). Then the OTP key needs to be pasted, followed by a CTRL+D character + inserted on an empty line. + +- `ot`: generates a MFA code based on the given key and copies it to the clipboard + (on Linux it relies on xsel, on MacOS X it uses pbcopy instead). + +The plugin uses `$HOME/.otp` to store its internal files. diff --git a/zsh/.oh-my-zsh/plugins/paver/README.md b/zsh/.oh-my-zsh/plugins/paver/README.md new file mode 100644 index 0000000..c38d898 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/paver/README.md @@ -0,0 +1,12 @@ +# Paver + +This plugin adds completion for the `paver` command-line tool of [Paver](https://pythonhosted.org/Paver/). + +To use it, add `paver` to the plugins array of your zshrc file: +```zsh +plugins=(... paver) +``` + +The completion function creates a cache of paver tasks with the name `.paver_tasks`, +in the current working directory. It regenerates that cache when the `pavement.py` +changes. diff --git a/zsh/.oh-my-zsh/plugins/rbfu/README.md b/zsh/.oh-my-zsh/plugins/rbfu/README.md new file mode 100644 index 0000000..f1f9fa2 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/rbfu/README.md @@ -0,0 +1,17 @@ +# rbfu plugin + +This plugin starts [rbfu](https://github.com/hmans/rbfu), a minimal Ruby version +manager, and adds some useful functions. + +To use it, add `rbfu` to the plugins array in your zshrc file: +```zsh +plugins=(... rbfu) +``` + +**Note: `rbfu` is deprecated and should no longer be used.** + +## Functions + +- `rbfu-rubies`: lists all installed rubies available to rbfu. + +- `rvm_prompt_info`: shows the Ruby version being used with rbfu. diff --git a/zsh/.oh-my-zsh/plugins/ros/README.md b/zsh/.oh-my-zsh/plugins/ros/README.md new file mode 100644 index 0000000..83573e4 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/ros/README.md @@ -0,0 +1,10 @@ +# Roswell Plugin + +This plugin adds completions and aliases for [Roswell](https://github.com/roswell/roswell/). + +To use it, add `ros` to the plugins array in your zshrc file: + +```zsh +plugins=(... ros) +``` + diff --git a/zsh/.oh-my-zsh/plugins/sfffe/README.md b/zsh/.oh-my-zsh/plugins/sfffe/README.md new file mode 100644 index 0000000..29044e8 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/sfffe/README.md @@ -0,0 +1,17 @@ +# "Search files for Front-End" + +This plugin adds a few functions for searching files used in Front-End web development. + +To use it, add `sfffe` to the plugins array in your zshrc file: +```zsh +plugins=(... sfffe) +``` + +**Requires:** `ack` + +## Functions + +- `ajs`: look for string in `.js` files. +- `acss`: look for string in `.css` files. +- `fjs`: search for `.js` files under the current working directory. +- `fcss`: search for `.css` files under the current working directory. diff --git a/zsh/.oh-my-zsh/plugins/svn-fast-info/README.md b/zsh/.oh-my-zsh/plugins/svn-fast-info/README.md new file mode 100644 index 0000000..04c596f --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/svn-fast-info/README.md @@ -0,0 +1,55 @@ +# svn-fast-info plugin + +Faster alternative to the main SVN plugin implementation. Works with svn 1.6 and newer. +Use as a drop-in replacement to the svn plugin, not as complementary. + +To use it, add `svn-fast-info` to the plugins array in your zshrc file: +```zsh +plugins=(... svn-fast-info) +``` + +It's faster because his efficient use of svn (single svn call) which saves a lot on a huge codebase +It displays the current status of the local files (added, deleted, modified, replaced, or else...) + +Use `svn_prompt_info` method to display the svn repository status in your theme. + +## Functions + +- `svn_prompt_info`: displays all the available information regarding the status of the svn repository. + +- `svn_repo_need_upgrade`: shows whether the repository needs upgrading. `svn_prompt_info` queries the + rest of functions or not based on the result of this function. + +- `svn_current_branch_name`: shows the current branch. + +- `svn_repo_root_name`: displays the repository root. + +- `svn_current_revision`: shows the currently checked-out revision. + +- `svn_status_info`: shows a bunch of symbols depending on the status of the files in the repository. + +## Options + +- `ZSH_THEME_SVN_PROMPT_PREFIX`: sequence displayed at the beginning of the prompt info output. + +- `ZSH_THEME_SVN_PROMPT_SUFFIX`: sequence displayed at the end of the prompt info output. + +- `ZSH_THEME_SVN_PROMPT_CLEAN`: sequence displayed when the status of the repository is clean. + +- `ZSH_THEME_SVN_PROMPT_ADDITIONS`: sequence displayed if there are added files in the repository. + **Default:** `+`. + +- `ZSH_THEME_SVN_PROMPT_DELETIONS`: sequence displayed if there are deleted files in the repository. + **Default:** `✖`. + +- `ZSH_THEME_SVN_PROMPT_MODIFICATIONS`: sequence displayed if there are modified files in the repository. + **Default:** `✎`. + +- `ZSH_THEME_SVN_PROMPT_REPLACEMENTS`: sequence displayed if there are replaced files in the repository. + **Default:** `∿`. + +- `ZSH_THEME_SVN_PROMPT_UNTRACKED`: sequence displayed if there are untracked files in the repository. + **Default:** `?`. + +- `ZSH_THEME_SVN_PROMPT_DIRTY`: sequence displayed if the repository is dirty. + **Default:** `!`. diff --git a/zsh/.oh-my-zsh/plugins/tmux-cssh/README.md b/zsh/.oh-my-zsh/plugins/tmux-cssh/README.md new file mode 100644 index 0000000..4602a50 --- /dev/null +++ b/zsh/.oh-my-zsh/plugins/tmux-cssh/README.md @@ -0,0 +1,10 @@ +# tmux-cssh plugin + +This plugin adds autocompletion for [`tmux-cssh`](https://github.com/zinic/tmux-cssh/). + +To use it, add `tmux-cssh` to the plugins array in your zshrc file: +```zsh +plugins=(... tmux-cssh) +``` + +First upstream repo, now disappeared: https://github.com/dennishafemann/tmux-cssh.