Adds zsh functions, needs work on moving some items

This commit is contained in:
2023-10-08 01:17:11 -04:00
parent 30ff7b7652
commit 05b36efeea
9 changed files with 39 additions and 41 deletions

17
zsh/config/functions/n Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env zsh
# Open's neovim.
#
# If the argument passed in is a directory or not supplied, then
# open neovim with telescope find files opened. Otherwise open the
# file that is supplied.
#
function n() {
[ -d "$1" ] || [ -z "$1" ] \
&& nvim -c ":Telescope find_files" \
&& return 0
nvim "$1"
}