From 7ad081b78ab494362f921b8bc92dd5b92ad48e7e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 6 Jul 2024 00:04:28 -0400 Subject: [PATCH] [wiki/MUTN] Add shell completions troubleshooting guide --- wiki/MUTN/completions.md | 32 ++++++++++++++++++++++++++++++++ wiki/main.md | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 wiki/MUTN/completions.md diff --git a/wiki/MUTN/completions.md b/wiki/MUTN/completions.md new file mode 100644 index 0000000..332d43d --- /dev/null +++ b/wiki/MUTN/completions.md @@ -0,0 +1,32 @@ +### ZSH completions not working? +Make sure your ~/.zshrc contains the following: +```shell +autoload -Uz compinit && compinit +``` +...and then restart your shell. +*** +### Bash completions not working? +Install your distribution's 'bash-completion' package or source the completion script manually. + +For most environments, this would mean adding the following to your ~/.bashrc: +```shell +source /usr/share/bash-completion/completions/mutn +``` +Note that this directory is different on FreeBSD. + +FreeBSD: +```shell +source /usr/local/share/bash-completion/completions/mutn +``` +...and then restart your shell. + +*Please note that Bash completions are slightly more limited than ZSH completions, and as such, new entries will not be auto-completed until the completions script is re-sourced.* +*** +### PowerShell completions not working? +Ensure you are using modern PowerShell (7+) as opposed to the built-in Windows PowerShell. + +Currently, completions must be manually installed and sourced in your PowerShell profile as such: +```shell +Set-PSReadlineKeyHandler -Key Tab -Function Complete # this line is optional; it makes tab completion function more similarly to Bash/ZSH +. :\path\to\mutn.ps1 +``` \ No newline at end of file diff --git a/wiki/main.md b/wiki/main.md index d16c22b..58364ec 100644 --- a/wiki/main.md +++ b/wiki/main.md @@ -9,7 +9,7 @@ Crossed out items have not yet been added to the wiki. [~~Windows Quirks~~](https://github.com/rwinkhart/MUTN/blob/main/wiki/MUTN/quirks.md) -[~~Shell Completions Troubleshooting~~](https://github.com/rwinkhart/MUTN/blob/main/wiki/MUTN/completions.md) +[Shell Completions Troubleshooting](https://github.com/rwinkhart/MUTN/blob/main/wiki/MUTN/completions.md) [~~Known Bugs~~](https://github.com/rwinkhart/MUTN/blob/main/wiki/MUTN/bugs.md) ### libmutton Information (will likely be moved to libmutton repository in the future)