Compare commits
10 commits
c407dd3bfb
...
661114e69f
Author | SHA1 | Date | |
---|---|---|---|
661114e69f | |||
6f496d07b9 | |||
b22f2c040e | |||
04d7c99dc1 | |||
e1c6d9fc64 | |||
03fd6d51f3 | |||
b03d2641c3 | |||
564e956ba4 | |||
816b023e71 | |||
6a44cfc35f |
5 changed files with 68 additions and 7 deletions
|
@ -17,7 +17,7 @@ alias cat="bat -p"
|
||||||
alias gfold="gfold -d classic"
|
alias gfold="gfold -d classic"
|
||||||
|
|
||||||
function hs() {
|
function hs() {
|
||||||
$(cat ~/.zsh_history|sk)
|
rg "$1" ~/.zsh_history
|
||||||
}
|
}
|
||||||
|
|
||||||
alias notes="codium ~/Notes"
|
alias notes="codium ~/Notes"
|
||||||
|
|
3
zsh/jj.zsh
Normal file
3
zsh/jj.zsh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
alias jpush="jj git push -b main"
|
||||||
|
alias jpull="jj git fetch && jj rebase -d main"
|
||||||
|
alias jmain="jj branch set -r @- main"
|
|
@ -1,6 +1,9 @@
|
||||||
#RG="rg"
|
# Parameters
|
||||||
RG="rga"
|
# You can on the fly reassign the values and update all the aliases with `zshrefresh`
|
||||||
RIPGREP_ARGS="-i --no-ignore-vcs"
|
|
||||||
|
#RG="${RG:-rg}"
|
||||||
|
RG="${RG:-rga}"
|
||||||
|
RIPGREP_ARGS="${RIPGREP_ARGS:--i}"
|
||||||
|
|
||||||
# Common Data
|
# Common Data
|
||||||
alias ripgrep_data_urls="$RG $RIPGREP_ARGS 'data:(.*?)(;base64)?,(.*)'"
|
alias ripgrep_data_urls="$RG $RIPGREP_ARGS 'data:(.*?)(;base64)?,(.*)'"
|
||||||
|
@ -19,5 +22,10 @@ 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}'"
|
alias ripgrep_copyright="$RG $RIPGREP_ARGS '(copyright|\u0026copy;|\\(c\\)|©) *[12][0-9]{3}'"
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
alias ripgrep_todo="$RG $RIPGREP_ARGS 'todo|unimplemented|refactor|deprecated|wip|review'"
|
alias ripgrep_todo="$RG $RIPGREP_ARGS 'todo|unimplemented|refactor|wip'"
|
||||||
alias ripgrep_fix="$RG $RIPGREP_ARGS 'fix|fixme'"
|
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'"
|
||||||
|
|
10
zsh/std.zsh
10
zsh/std.zsh
|
@ -29,4 +29,12 @@ data_url() {
|
||||||
echo "\$ data_url [FILE_PATH]"
|
echo "\$ data_url [FILE_PATH]"
|
||||||
echo "Turn data into a data URL"
|
echo "Turn data into a data URL"
|
||||||
fi
|
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
|
||||||
|
}
|
||||||
|
|
|
@ -15,4 +15,46 @@ alias downloadYT="yt-dlp --write-thumbnail \
|
||||||
|
|
||||||
function downloadList() {
|
function downloadList() {
|
||||||
cat $1 |xargs -I _ yt-dlp --downloader aria2c _
|
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
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue