mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-26 18:23:20 +01:00
Remove unused zsh functions and aliases
This commit is contained in:
parent
6bcec7520e
commit
8a8fc67cd3
@ -56,11 +56,7 @@ alias volume="vol"
|
|||||||
# Miscellaneous aliases
|
# Miscellaneous aliases
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
alias vim="vim -p" # Open multiple files in new tabs instead of buffers
|
alias vz="nvim +Files" # Open any file inside a directory easily with fzf
|
||||||
alias vh="vim -o" # Open multiple files horizontally
|
|
||||||
alias vv="vim -O" # Open multiple files vertically
|
|
||||||
alias vc="vimdiff" # Easily compare two files side by side for differences between them
|
|
||||||
alias vz="vim +Files" # Open any file inside a directory easily with fzf
|
|
||||||
|
|
||||||
# Quick and easy way to download the majority of online videos
|
# Quick and easy way to download the majority of online videos
|
||||||
alias dl="youtube-dl -f bestvideo+bestaudio"
|
alias dl="youtube-dl -f bestvideo+bestaudio"
|
||||||
@ -111,6 +107,6 @@ alias lfox="launch waterfox" # Launch waterfox separate from the terminal
|
|||||||
# Fun aliases that don't serve any specific purpose
|
# Fun aliases that don't serve any specific purpose
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
alias emacs="vim" # No need to start another operating system
|
alias emacs="nvim" # No need to start another operating system
|
||||||
alias nano="vim" # Why nano when you have vim?
|
alias nano="nvim" # Why nano when you have vim?
|
||||||
alias vi="vim" # Vim is vi improved, literally
|
alias vi="nvim" # Vim is vi improved, literally
|
||||||
|
@ -87,63 +87,10 @@ function ss() {
|
|||||||
|
|
||||||
# Automatically open the readme in any repository
|
# Automatically open the readme in any repository
|
||||||
function readme() {
|
function readme() {
|
||||||
local readme=`ls | grep README`
|
local readme=`ls | ag README`
|
||||||
if [[ $readme ]]; then
|
if [[ $readme ]]; then
|
||||||
nvim $readme
|
nvim $readme
|
||||||
else
|
else
|
||||||
echo "No README found."
|
echo "No README found."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extract any file easily
|
|
||||||
function extract() {
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "You must specify a file to extract."
|
|
||||||
echo "Usage: extract <filename>"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f $1 ]; then
|
|
||||||
case $1 in
|
|
||||||
*.rar) unrar x -ad ../$1 ;; # Proprietary rar format
|
|
||||||
*.zip) unzip ../$1 ;; # Simple and clean zip files
|
|
||||||
*.7z) 7z x ../$1 ;; # Free and open source 7z format
|
|
||||||
# Other formats
|
|
||||||
*.tar.bz2) tar xvjf ../$1 ;;
|
|
||||||
*.tar.gz) tar xvzf ../$1 ;;
|
|
||||||
*.tar.xz) tar xvJf ../$1 ;;
|
|
||||||
*.lzma) unlzma ../$1 ;;
|
|
||||||
*.bz2) bunzip2 ../$1 ;;
|
|
||||||
*.gz) gunzip ../$1 ;;
|
|
||||||
*.tar) tar xvf ../$1 ;;
|
|
||||||
*.tbz2) tar xvjf ../$1 ;;
|
|
||||||
*.tgz) tar xvzf ../$1 ;;
|
|
||||||
*.xz) unxz ../$1 ;;
|
|
||||||
*.Z) uncompress ../$1 ;;
|
|
||||||
# Fallback if none of these work
|
|
||||||
*) echo "extract: '$1' - Unknown archive method." ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
echo "extract: '$1' - File does not exist."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# Opening things and other launcher functions
|
|
||||||
####################################################################
|
|
||||||
|
|
||||||
# TODO: Easily play any video (both online and offline)
|
|
||||||
function play() {
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "You need to pass something to play."
|
|
||||||
echo "Usage: play <pattern to search for>"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# TODO: Figure out why this doesn't work for certain inputs
|
|
||||||
launch mpv "`ls | grep -i \"$1\"`"
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO: Easily open any file
|
|
||||||
function open() {
|
|
||||||
echo "TODO"
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user