mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
feat: Adds find-latest function to zsh, 'fl' alias for it, lazyvim config changes.
This commit is contained in:
@@ -164,6 +164,7 @@ alias d='docker' # run docker commands quickly
|
||||
alias dc='docker compose' # run docker-compose commands quickly
|
||||
alias dv='dirs -v' # list directory info
|
||||
alias essh='edit-ssh-config' # edit ssh config quickly
|
||||
alias fl='find-latest' # Find the last modified file in a directory.
|
||||
alias g='git' # access git commands quickly
|
||||
alias ga='git add' # add files to git quickly
|
||||
alias gcb='git checkout -b' # checkout a new git branch, creating if needed.
|
||||
|
||||
7
zsh/config/functions/find-latest
Executable file
7
zsh/config/functions/find-latest
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# Find the last modified file in a directory.
|
||||
function find-latest() {
|
||||
local dir=$1
|
||||
echo "$(find $dir -maxdepth 1 -mindepth 1 -type f -ctime 30 | sort -nr | head -1)"
|
||||
}
|
||||
Reference in New Issue
Block a user