Adapt zsh config for macOS
This commit is contained in:
		| @@ -55,7 +55,7 @@ autoload -Uz cf | |||||||
| # Make a directory, then change into it | # Make a directory, then change into it | ||||||
|  |  | ||||||
| mkcd() { | mkcd() { | ||||||
|     [[ ! -d "${1}" ]] && mkdir --parents -- "${1}" |     [[ ! -d "${1}" ]] && gmkdir --parents -- "${1}" | ||||||
|     cd "${1}" || exit |     cd "${1}" || exit | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| # ---------- Normal Aliases ---------- | # ---------- Normal Aliases ---------- | ||||||
| # Common commands | # Common commands | ||||||
| alias cp='cp -piv' | alias cp='gcp -piv' | ||||||
| alias mv='mv -iv' | alias mv='gmv -iv' | ||||||
| # Use safe-rm instead of rm | # Use safe-rm instead of rm | ||||||
| alias rm='safe-rm -iv' | alias rm='safe-rm -iv' | ||||||
| alias rmdir='rmdir -v' | alias rmdir='grmdir -v' | ||||||
|  |  | ||||||
| # Games | # Games | ||||||
| alias add-modrinth='ferium add-modrinth' | alias add-modrinth='ferium add-modrinth' | ||||||
| @@ -73,10 +73,10 @@ alias pr='makepkg --force --clean --cleanbuild --syncdeps --rmdeps && addpkg rpm | |||||||
| # Personal | # Personal | ||||||
| alias :q='exit' | alias :q='exit' | ||||||
| alias ct='cptemplate' | alias ct='cptemplate' | ||||||
| alias less='less -i --' | #alias less='less -i --' | ||||||
| alias la='ls --almost-all --color --group-directories-first --human-readable -l' | alias la='gls --almost-all --color --group-directories-first --human-readable -l' | ||||||
| alias ls='ls --color --group-directories-first' | alias ls='gls --color --group-directories-first' | ||||||
| alias ll='ls --classify --color --group-directories-first --human-readable -l' | alias ll='gls --classify --color --group-directories-first --human-readable -l' | ||||||
| alias python='python3' | alias python='python3' | ||||||
| alias spcli='speedtest-cli --secure' | alias spcli='speedtest-cli --secure' | ||||||
| alias sshconfig='"${EDITOR}" -- ${HOME}/.ssh/config' | alias sshconfig='"${EDITOR}" -- ${HOME}/.ssh/config' | ||||||
| @@ -150,3 +150,8 @@ stow-config () { | |||||||
|         fi |         fi | ||||||
|     done |     done | ||||||
| } | } | ||||||
|  |  | ||||||
|  | getwifipassword() { | ||||||
|  |     security find-generic-password -ga "$1" | rg "password | ||||||
|  | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,2 @@ | |||||||
| # bindkey -M viins '^r' history-incremental-search-backward | # bindkey -M viins '^r' history-incremental-search-backward | ||||||
| # bindkey -M vicmd '^r' history-incremental-search-backward | # bindkey -M vicmd '^r' history-incremental-search-backward | ||||||
|  |  | ||||||
| # vim: syntax=zsh |  | ||||||
|   | |||||||
| @@ -3,8 +3,8 @@ | |||||||
|  |  | ||||||
| # Auto-completion | # Auto-completion | ||||||
| # --------------- | # --------------- | ||||||
| [[ $- == *i* ]] && source "/usr/share/fzf/completion.zsh" | [[ $- == *i* ]] && source "/usr/local/Cellar/fzf/0.33.0/shell/completion.zsh" | ||||||
|  |  | ||||||
| # Key bindings | # Key bindings | ||||||
| # ------------ | # ------------ | ||||||
| source "/usr/share/fzf/key-bindings.zsh" | source "/usr/local/Cellar/fzf/0.33.0/shell/key-bindings.zsh" | ||||||
|   | |||||||
| @@ -10,5 +10,3 @@ setopt correctall | |||||||
|  |  | ||||||
| # prevent accidental overwriting of a file | # prevent accidental overwriting of a file | ||||||
| setopt noclobber | setopt noclobber | ||||||
|  |  | ||||||
| # vim: syntax=zsh |  | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| # PATH variable configuration  | # PATH variable configuration  | ||||||
| path=("${HOME}/Scripts/Arch Linux Helpers" $path) | path=("${HOME}/Scripts/macOS Helpers" "${HOME}/.local/bin" $path) | ||||||
|  |  | ||||||
| export PATH | export PATH | ||||||
|   | |||||||
| @@ -1,8 +0,0 @@ | |||||||
| # Notify on ssh login |  | ||||||
| if [[ -n $SSH_CONNECTION ]]; then |  | ||||||
|     IP="$(echo $SSH_CONNECTION | cut -d " " -f 1)" |  | ||||||
|     HOSTNAME=$(hostname) |  | ||||||
|     NOW=$(date +"%e %b %Y, %a %r") |  | ||||||
|     EMAIL='erictorres4@pm.me' |  | ||||||
|     echo "Login from ${IP} on ${HOSTNAME} on ${NOW}" | neomutt -s 'SSH Login Notification' "${EMAIL}" 2>/dev/null |  | ||||||
| fi |  | ||||||
		Reference in New Issue
	
	Block a user