Created
August 7, 2020 18:59
-
-
Save scarolan/520a91f39817383b3d6614e7a2fb99cd to your computer and use it in GitHub Desktop.
zsh_stuff
This file contains hidden or 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
# Aliases | |
alias ls='lsd' | |
alias l='ls -l' | |
alias la='ls -a' | |
alias lla='ls -la' | |
alias lt='ls --tree' | |
alias e='explorer.exe' | |
# Useful cd paths | |
setopt auto_cd | |
cdpath=(/mnt/c/Users/sean $HOME/git_repos) | |
# Set executable path | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Functions | |
# Saves the last command as a function | |
slc() { | |
last_command=$(fc -nl | tail -1) | |
command_name="$1" | |
read -r -d '' new_fun <<EOF | |
${command_name}() { | |
$last_command | |
} | |
EOF | |
eval "$new_fun" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment