-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dotfiles | Minor changes and updates (#4)
* Update .aliases for macos * Add dotnet helper script * Update and test helper scripts. * Update dotnet helper * Reduce plugings to simplify initial vim settings * Add support for Powerline fonts.
- Loading branch information
1 parent
5421a31
commit bc463cc
Showing
16 changed files
with
338 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# zsh parameter completion for the dotnet CLI | ||
# https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#zsh | ||
_dotnet_zsh_complete() { | ||
local completions=("$(dotnet complete "${words}")") | ||
|
||
# If the completion list is empty, just continue with filename selection | ||
if [ -z "${completions}" ] | ||
then | ||
_arguments '*::arguments: _normal' | ||
return | ||
fi | ||
|
||
# This is not a variable assigment, don't remove spaces! | ||
_values = "${(ps:\n:)completions}" | ||
} | ||
|
||
compdef _dotnet_zsh_complete dotnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export PATH="${0:A:h}:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Dotnet | ||
|
||
## macOS | ||
|
||
[Dotnet - macOS (Download)](https://dotnet.microsoft.com/en-us/download) | ||
|
||
###### PATH | ||
|
||
``` | ||
cat << EOF >> ~/.zshrc | ||
# Dotnet | ||
DOTNET_ROOT="${HOME}/.dotnet" | ||
DOTNET_INSTALL_DIR="${HOME}/.dotnet" | ||
PATH="\${PATH}:${DOTNET_ROOT}:${DOTNET_INSTALL_DIR}" | ||
export DOTNET_ROOT DOTNET_INSTALL_DIR PATH | ||
EOF | ||
``` | ||
|
||
##### dotnet-install | ||
|
||
[Dotnet - additional-tools (dotnet-install)](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script) | ||
|
||
###### CLI | ||
|
||
``` | ||
dotnet-install -h | ||
``` | ||
|
||
``` | ||
... | ||
Install Location: | ||
Location is chosen in following order: | ||
- --install-dir option | ||
- Environmental variable DOTNET_INSTALL_DIR | ||
- ${HOME}/.dotnet | ||
``` | ||
|
||
##### dotnet-core-uninstall | ||
|
||
[Dotnet - additional-tools ()](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool?tabs=macos) | ||
|
||
###### CLI | ||
|
||
``` | ||
dotnet-core-uninstall -h | ||
``` | ||
|
||
``` | ||
... | ||
Commands: | ||
list List .NET Core SDKs or Runtimes that can be removed with this tool. | ||
dry-run, whatif <VERSION> Display .NET Core SDKs and Runtimes that will be removed. | ||
remove <VERSION> Remove the specified .NET Core SDKs or Runtimes. | ||
``` | ||
|
||
### Visual Studio Code (vscode) | ||
|
||
[Visual Studio Code - Download](https://code.visualstudio.com/download) | ||
|
||
##### CLI (code) | ||
|
||
[Dotnet - CLI (code)](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool?tabs=macos) | ||
|
||
###### PATH | ||
|
||
``` | ||
cat << EOF >> ~/.zprofile | ||
# Add Visual Studio Code (code) | ||
export PATH="\${PATH}:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | ||
EOF | ||
``` | ||
|
||
## Helpful | ||
|
||
``` | ||
code ~/.zshrc | ||
dotnet-install --channel LTS | ||
dotnet-install --runtime dotnet --version 6.0.0 | ||
dotnet-install --channel 6.0 --runtime aspnetcore | ||
dotnet-core-uninstall list | ||
dotnet-core-uninstall remove --sdk 6.0.201 | ||
dotnet-core-uninstall remove --runtime 6.0.3 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Git Hooks | ||
|
||
[Git - Hooks](https://git-scm.com/docs/githooks) | ||
|
||
### pre-commit | ||
|
||
[pre-commit - Installation](https://pre-commit.com/#installation) | ||
[pre-commit - Hooks](https://pre-commit.com/hooks.html) | ||
|
||
##### Install with Homebrew | ||
|
||
``` | ||
brew install pre-commit | ||
``` | ||
|
||
``` | ||
pre-commit --version | ||
``` | ||
|
||
## Helpful (CLI) | ||
|
||
``` | ||
$ pre-commit install | ||
pre-commit installed at .git/hooks/pre-commit | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/zsh | ||
# shellcheck disable=all | ||
# Install dotnet command-line tools (https://learn.microsoft.com/en-us/dotnet/core/install/) | ||
[ -d "${HOME}/.dotnet" ] || mkdir -p "${HOME}/.dotnet" | ||
|
||
# dotnet-install | ||
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#recommended-version | ||
typeset -r vcli_lab_ifile='https://dot.net/v1/dotnet-install.sh' | ||
(cd "${HOME}/.dotnet" && curl -sL -o 'dotnet-install' "${vcli_lab_ifile}") | ||
(cd "${HOME}/.dotnet" && chmod 0750 'dotnet-install') | ||
|
||
# dotnet-uninstall | ||
# https://github.com/dotnet/cli-lab/releases/latest | ||
typeset -r vcli_lab='1.5.255402' | ||
typeset -r vcli_lab_ufile='dotnet-core-uninstall.tar.gz' | ||
(cd "${HOME}/.dotnet" && curl -sL -o "${vcli_lab_ufile}" "https://github.com/dotnet/cli-lab/releases/download/${vcli_lab}/${vcli_lab_ufile}") | ||
(cd "${HOME}/.dotnet" && tar -zxf "${vcli_lab_ufile}" && rm "${vcli_lab_ufile}") | ||
|
||
# Adding Dotnet to .zshrc | ||
typeset -r _ZSHRC="${HOME}/.zshrc" | ||
if ! grep -i "\${HOME}/.dotnet" "${_ZSHRC}" 1>/dev/null 2>&1; then | ||
(cat << EOF >> "${_ZSHRC}" | ||
# Dotnet | ||
DOTNET_ROOT="${HOME}/.dotnet" | ||
DOTNET_INSTALL_DIR="${HOME}/.dotnet" | ||
PATH="\${PATH}:${HOME}/.dotnet" | ||
export DOTNET_ROOT DOTNET_INSTALL_DIR PATH | ||
EOF | ||
) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/zsh | ||
# shellcheck disable=all | ||
|
||
# Go | ||
# https://go.dev/doc/install | ||
# https://pkg.go.dev/cmd/go#section-directories | ||
|
||
# Go Environment (go env) | ||
# https://github.com/golang/go/wiki/SettingGOPATH#zsh | ||
# GOARCH="amd64" | ||
# GOBIN="" | ||
# GOFLAGS="" | ||
# GOOS="darwin" | ||
# GOPATH="" | ||
# GOPROXY="https://proxy.golang.org,direct" | ||
typeset -r GOPATH="${HOME}/go" | ||
export GOPATH | ||
|
||
# Adding Golang to .zshrc | ||
typeset -r _ZSHRC="${HOME}/.zshrc" | ||
if ! grep -i "\${PATH}:${GOPATH}" "${_ZSHRC}" 1>/dev/null 2>&1; then | ||
(cat << EOF >> "${_ZSHRC}" | ||
# Golang | ||
export PATH="\${PATH}:${GOPATH}" | ||
EOF | ||
) | ||
fi | ||
|
||
# f: _chk_go, install golang and print version | ||
_chk_go() { | ||
# Install go via Homebrew (fastest) | ||
if command -v brew 1>/dev/null 2>&1; then | ||
brew install -sq go | ||
fi | ||
} | ||
_chk_go | ||
|
||
# Check for golang | ||
if command -v go 1>/dev/null 2>&1; then | ||
[ -d "${GOPATH}" ] || mkdir -p "${GOPATH}/{bin,pkg,src}"; | ||
fi |
Oops, something went wrong.