diff --git a/zsh/fn.zsh b/zsh/fn.zsh index 6a15fed..60e3ad2 100644 --- a/zsh/fn.zsh +++ b/zsh/fn.zsh @@ -17,7 +17,7 @@ alias cat="bat -p" alias gfold="gfold -d classic" function hs() { - rg "$1" ~/.zsh_history + $(cat ~/.zsh_history|sk) } alias notes="codium ~/Notes" diff --git a/zsh/jj.zsh b/zsh/jj.zsh deleted file mode 100644 index 79dd7cb..0000000 --- a/zsh/jj.zsh +++ /dev/null @@ -1,3 +0,0 @@ -alias jpush="jj git push -b main" -alias jpull="jj git fetch && jj rebase -d main" -alias jmain="jj branch set -r @- main" diff --git a/zsh/ripgrep.zsh b/zsh/ripgrep.zsh index e8267b0..8a3205a 100644 --- a/zsh/ripgrep.zsh +++ b/zsh/ripgrep.zsh @@ -1,9 +1,6 @@ -# Parameters -# You can on the fly reassign the values and update all the aliases with `zshrefresh` - -#RG="${RG:-rg}" -RG="${RG:-rga}" -RIPGREP_ARGS="${RIPGREP_ARGS:--i}" +#RG="rg" +RG="rga" +RIPGREP_ARGS="-i --no-ignore-vcs" # Common Data alias ripgrep_data_urls="$RG $RIPGREP_ARGS 'data:(.*?)(;base64)?,(.*)'" @@ -22,10 +19,5 @@ alias ripgrep_sec="$RG $RIPGREP_ARGS '(aws_access|aws_secret|api[_-]?key|ListBuc alias ripgrep_copyright="$RG $RIPGREP_ARGS '(copyright|\u0026copy;|\\(c\\)|©) *[12][0-9]{3}'" # Development -alias ripgrep_todo="$RG $RIPGREP_ARGS 'todo|unimplemented|refactor|wip'" -alias ripgrep_review="$RG $RIPGREP_ARGS 'review|deprecated'" -alias ripgrep_fix="$RG $RIPGREP_ARGS 'fix|fixme'" -alias ripgrep_rocket_routes="$RG $RIPGREP_ARGS '#\\[(\\w+)\\(\"[^\"]*\"'" - -code_words='`([^`]+)`' -alias ripgrep_code_words="$RG $RIPGREP_ARGS ''$code_words'" +alias ripgrep_todo="$RG $RIPGREP_ARGS 'todo|unimplemented|refactor|deprecated|wip|review'" +alias ripgrep_fix="$RG $RIPGREP_ARGS 'fix|fixme'" \ No newline at end of file diff --git a/zsh/std.zsh b/zsh/std.zsh index f25b162..b7ce90a 100644 --- a/zsh/std.zsh +++ b/zsh/std.zsh @@ -29,12 +29,4 @@ data_url() { echo "\$ data_url [FILE_PATH]" echo "Turn data into a data URL" fi -} - -# usage: echolc FILE ECHO -# output `ECHO` for every line in `FILE`. Useful for the paste command. -function echolc() { - for i in $(seq $(cat "$1" | wc -l)); do - echo "$2" - done -} +} \ No newline at end of file diff --git a/zsh/youtube-dl.zsh b/zsh/youtube-dl.zsh index 835af59..e753e77 100644 --- a/zsh/youtube-dl.zsh +++ b/zsh/youtube-dl.zsh @@ -15,46 +15,4 @@ alias downloadYT="yt-dlp --write-thumbnail \ function downloadList() { cat $1 |xargs -I _ yt-dlp --downloader aria2c _ -} - -# info_json VIDEO_FILE -# Extract info.json from video file -function info_json() { - mkvextract -q attachments "$1" "1:/proc/self/fd/1" -} - -# info_json_url VIDEO_FILE -# Get URL from info.json -function info_json_url() { - info_json "$1" | jq -r .webpage_url -} - -# info_json_title VIDEO_FILE -# Get Title from info.json -function info_json_title() { - info_json "$1" | jq -r .title -} - -# info_json_desc VIDEO_FILE -# Get description from info.json -function info_json_desc() { - info_json "$1" | jq -r .description -} - -# info_json_uploader VIDEO_FILE -# Get uploader from info.json -function info_json_uploader() { - info_json "$1" | jq -r .uploader -} - -# info_json_uploader_url VIDEO_FILE -# Get uploader URL from info.json -function info_json_uploader_url() { - info_json "$1" | jq -r .uploader_url -} - -# info_json_upload_date VIDEO_FILE -# Get upload date from info.json -function info_json_upload_date() { - info_json "$1" | jq -r .upload_date } \ No newline at end of file