refactor(history): commit development branch
All checks were successful
/ job (push) Successful in 1m12s

new development branch from root commit
This commit is contained in:
Marc Beninca 2025-02-10 21:54:51 +01:00
parent 3e562930f6
commit 020aaa0b9a
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
94 changed files with 4804 additions and 0 deletions

95
sh/alias/apt.sh Normal file
View file

@ -0,0 +1,95 @@
# show package information
acl() { a__apt_cache_list "${@}"; }
a__apt_cache_list() {
apt-cache \
show \
"${@}"
}
# package versions policy
acp() { a__apt_cache_policy "${@}"; }
a__apt_cache_policy() {
apt-cache \
policy \
"${@}"
}
# search package
acs() { a__apt_cache_search "${@}"; }
a__apt_cache_search() {
apt-cache \
search \
"${@}"
}
#
agap() { a__apt_get_auto_purge "${@}"; }
a__apt_get_auto_purge() {
apt-get \
autopurge \
"${@}"
}
#
agar() { a__apt_get_auto_remove "${@}"; }
a__apt_get_auto_remove() {
apt-get \
autoremove \
"${@}"
}
# clean packages cache
agc() { a__apt_get_clean "${@}"; }
a__apt_get_clean() {
apt-get \
clean \
"${@}"
}
# upgrade allowing package installation or removal
agfu() { a__apt_get_full_upgrade "${@}"; }
a__apt_get_full_upgrade() {
apt-get \
full-upgrade \
"${@}"
}
# install packages
agi() { a__apt_get_install "${@}"; }
a__apt_get_install() {
apt-get \
install \
"${@}"
}
#
agp() { a__apt_get_purge "${@}"; }
a__apt_get_purge() {
apt-get \
purge \
"${@}"
}
#
agr() { a__apt_get_remove "${@}"; }
a__apt_get_remove() {
apt-get \
remove \
"${@}"
}
# update packages catalog
agud() { a__apt_get_up_date "${@}"; }
a__apt_get_up_date() {
apt-get \
update \
"${@}"
}
# upgrade forbidding package installation or removal
agug() { a__apt_get_up_grade "${@}"; }
a__apt_get_up_grade() {
apt-get \
upgrade \
"${@}"
}

5
sh/alias/batcat.sh Normal file
View file

@ -0,0 +1,5 @@
b() { a__bat "${@}"; }
a__bat() {
batcat \
"${@}"
}

73
sh/alias/btrfs.sh Normal file
View file

@ -0,0 +1,73 @@
bfdf() { a__btrfs_filesystem_d_f "${@}"; }
a__btrfs_filesystem_d_f() {
btrfs \
filesystem \
df \
"${@}"
}
bfdu() { a__btrfs_filesystem_d_u "${@}"; }
a__btrfs_filesystem_d_u() {
btrfs \
filesystem \
du \
--summarize \
"${@}"
}
bfu() { a__btrfs_filesystem_usage "${@}"; }
a__btrfs_filesystem_usage() {
btrfs \
filesystem \
usage \
"${@}"
}
bpg() { a__btrfs_property_get "${@}"; }
a__btrfs_property_get() {
btrfs \
property \
get \
"${@}"
}
bsc() { a__btrfs_subvolume_create "${@}"; }
a__btrfs_subvolume_create() {
btrfs \
subvolume \
create \
"${@}"
}
bsd() { a__btrfs_subvolume_delete "${@}"; }
a__btrfs_subvolume_delete() {
btrfs \
subvolume \
delete \
"${@}"
}
bsl() { a__btrfs_subvolume_list "${@}"; }
a__btrfs_subvolume_list() {
if [ -n "${1}" ]; then
btrfs subvolume list "${1}" |
cut --delimiter " " --fields 9 |
sort
fi
}
bss() { a__btrfs_subvolume_snapshot "${@}"; }
a__btrfs_subvolume_snapshot() {
btrfs \
subvolume \
snapshot \
"${@}"
}
bssr() { a__btrfs_subvolume_snapshot_r "${@}"; }
a__btrfs_subvolume_snapshot_r() {
btrfs \
subvolume \
snapshot -r \
"${@}"
}

27
sh/alias/byobu.sh Normal file
View file

@ -0,0 +1,27 @@
bb() { a__byo_bu "${@}"; }
a__byo_bu() {
byobu \
"${@}"
}
bba() { a__byo_bu_attach "${@}"; }
a__byo_bu_attach() {
byobu \
attach-session \
"${@}"
}
bbl() { a__byo_bu_ls "${@}"; }
a__byo_bu_ls() {
byobu \
ls \
"${@}"
}
bbnd() { a__byo_bu_new_detach "${@}"; }
a__byo_bu_new_detach() {
byobu \
new-session \
-d \
"${@}"
}

15
sh/alias/chmod.sh Normal file
View file

@ -0,0 +1,15 @@
# change mode to directory
cmd() { a__change_mode_directory "${@}"; }
a__change_mode_directory() {
chmod \
"755" \
"${@}"
}
# change mode to file
cmf() { a__change_mode_file "${@}"; }
a__change_mode_file() {
chmod \
"644" \
"${@}"
}

15
sh/alias/chown.sh Normal file
View file

@ -0,0 +1,15 @@
# change owner to root
cor() { a__change_owner_root "${@}"; }
a__change_owner_root() {
chown \
"0:0" \
"${@}"
}
# change owner to user
cou() { a__change_owner_user "${@}"; }
a__change_owner_user() {
chown \
"1000:1000" \
"${@}"
}

6
sh/alias/clear.sh Normal file
View file

@ -0,0 +1,6 @@
# clear terminal
c() { a__clear "${@}"; }
a__clear() {
clear \
"${@}"
}

7
sh/alias/cp.sh Normal file
View file

@ -0,0 +1,7 @@
# copy interactively
cpi() { a__co_py_interactive "${@}"; }
a__co_py_interactive() {
cp \
--interactive \
"${@}"
}

5
sh/alias/emacs.sh Normal file
View file

@ -0,0 +1,5 @@
em() { a__e_macs "${@}"; }
a__e_macs() {
emacs \
"${@}"
}

5
sh/alias/evince.sh Normal file
View file

@ -0,0 +1,5 @@
ev() { a__e_vince "${@}"; }
a__e_vince() {
evince \
"${@}"
}

548
sh/alias/git.sh Normal file
View file

@ -0,0 +1,548 @@
RWX_GIT_LOG_FORMAT="\
%C(auto)%h%d
S %C(red)%GS
A %C(green)%an %ae
%C(green)%ai
C %C(blue)%cn %ce
%C(blue)%ci
%B"
# add to index
ga() { a__git_add "${@}"; }
a__git_add() {
git \
add \
"${@}"
}
# add all to index
gaa() { a__git_add_all "${@}"; }
a__git_add_all() {
git \
add \
--all \
"${@}"
}
# add parts of all to index
gaap() { a__git_add_all_patch "${@}"; }
a__git_add_all_patch() {
git \
add \
--all \
--patch \
"${@}"
}
# add parts to index
gap() { a__git_add_patch "${@}"; }
a__git_add_patch() {
git \
add \
--patch \
"${@}"
}
# create a branch
gb() { a__git_branch "${@}"; }
a__git_branch() {
git \
branch \
"${@}"
}
# delete a branch
gbd() { a__git_branch_delete "${@}"; }
a__git_branch_delete() {
git \
branch \
--delete \
"${@}"
}
# force a branch deletion
gbdf() { a__git_branch_delete_force "${@}"; }
a__git_branch_delete_force() {
git \
branch \
--delete \
--force \
"${@}"
}
# list branches
gbl() { a__git_branch_list "${@}"; }
a__git_branch_list() {
git \
branch \
--all \
--list \
--verbose \
--verbose \
"${@}"
}
# set the link to a remote branch from a local branch
gbsu() { a__git_branch_set_upstream "${@}"; }
a__git_branch_set_upstream() {
git \
branch \
--set-upstream-to \
"${@}"
}
# switch to a branch or checkout file(s) from a commit
gc() { a__git_checkout "${@}"; }
a__git_checkout() {
git \
checkout \
"${@}"
}
# checkout an orphan branch
gco() { a__git_checkout_orphan "${@}"; }
a__git_checkout_orphan() {
git \
checkout \
--orphan \
"${@}"
}
# pick a commit
gcp() { a__git_cherry_pick "${@}"; }
a__git_cherry_pick() {
git \
cherry-pick \
"${@}"
}
# abort the commit pick
gcpa() { a__git_cherry_pick_abort "${@}"; }
a__git_cherry_pick_abort() {
git \
cherry-pick \
--abort \
"${@}"
}
# continue the commit pick
gcpc() { a__git_cherry_pick_continue "${@}"; }
a__git_cherry_pick_continue() {
git \
cherry-pick \
--continue \
"${@}"
}
# clean untracked files
gcf() { a__git_clean_force "${@}"; }
a__git_clean_force() {
git \
clean \
-d \
--force \
"${@}"
}
# redo the last commit with a different message
gcam() { a__git_commit_amend_message "${@}"; }
a__git_commit_amend_message() {
git \
commit \
--amend \
--message \
"${@}"
}
# make a root commit
gcem() { a__git_commit_empty_message "${@}"; }
a__git_commit_empty_message() {
git \
commit \
--allow-empty \
--allow-empty-message \
--message \
"${@}"
}
# commit the index
gcm() { a__git_commit_message "${@}"; }
a__git_commit_message() {
git \
commit \
--message \
"${@}"
}
# configure the user email
gcue() { a__git_config_user_email "${@}"; }
a__git_config_user_email() {
git \
config \
"user.email" \
"${@}"
}
# configure the user name
gcun() { a__git_config_user_name "${@}"; }
a__git_config_user_name() {
git \
config \
"user.name" \
"${@}"
}
# differences from last or between commits
gd() { a__git_diff "${@}"; }
a__git_diff() {
git \
diff \
"${@}"
}
# display what is indexed in cache
gdc() { a__git_diff_cached "${@}"; }
a__git_diff_cached() {
git \
diff \
--cached \
"${@}"
}
# indexed character-level differences
gdcw() { a__git_diff_cached_word "${@}"; }
a__git_diff_cached_word() {
git \
diff \
--cached \
--word-diff-regex "." \
"${@}"
}
# differences via external tool
gdt() { a__git_diff_tool "${@}"; }
a__git_diff_tool() {
git \
difftool \
--dir-diff \
"${@}"
}
# character-level differences
gdw() { a__git_diff_word "${@}"; }
a__git_diff_word() {
git \
diff \
--word-diff-regex "." \
"${@}"
}
# fetch from the remote repository
gf() { a__git_fetch "${@}"; }
a__git_fetch() {
rwx_gpg_agent_update &&
git \
fetch \
--tags \
--verbose \
"${@}"
}
# fetch from remote repository and prune local orphan branches
gfp() { a__git_fetch_prune "${@}"; }
a__git_fetch_prune() {
a__git_fetch \
--prune \
"${@}"
}
# garbage collect all orphan commits
ggc() { a__git_garbage_collect "${@}"; }
a__git_garbage_collect() {
git \
reflog \
expire \
--all \
--expire "all" &&
git \
gc \
--aggressive \
--prune="now"
}
# initialize a new repository
gi() { a__git_init "${@}"; }
a__git_init() {
git \
init \
"${@}"
}
# initialize a new bare repository
gib() { a__git_init_bare "${@}"; }
a__git_init_bare() {
git \
init \
--bare \
"${@}"
}
# log history
gl() { a__git_log "${@}"; }
a__git_log() {
git \
log \
--abbrev=8 \
--abbrev-commit \
--format="${RWX_GIT_LOG_FORMAT}" \
--graph \
"${@}"
}
# log all history
gla() { a__git_log_all "${@}"; }
a__git_log_all() {
a__git_log \
--all \
"${@}"
}
# log all history with patches
glap() { a__git_log_all_patch "${@}"; }
a__git_log_all_patch() {
a__git_log \
--all \
--patch \
"${@}"
}
# log history with patches
glp() { a__git_log_patch "${@}"; }
a__git_log_patch() {
a__git_log \
--patch \
"${@}"
}
# fast-forward merge to remote branch
gm() { a__git_merge "${@}"; }
a__git_merge() {
git \
merge \
--ff-only \
"${@}"
}
# abort the current merge commit
gma() { a__git_merge_abort "${@}"; }
a__git_merge_abort() {
git \
merge \
--abort \
"${@}"
}
# do a merge commit
gmc() { a__git_merge_commit "${@}"; }
a__git_merge_commit() {
git \
merge \
--no-ff \
--message \
"${@}"
}
# squash a branch and index its modifications
gms() { a__git_merge_squash "${@}"; }
a__git_merge_squash() {
git \
merge \
--squash \
"${@}"
}
# merge via external tool
gmt() { a__git_merge_tool "${@}"; }
a__git_merge_tool() {
git \
mergetool \
"${@}"
}
# push to the remote repository
gp() { a__git_push "${@}"; }
a__git_push() {
rwx_gpg_agent_update &&
git \
push \
--tags \
--verbose \
"${@}"
}
# delete from the remote repository
gpd() { a__git_push_delete "${@}"; }
a__git_push_delete() {
git \
push \
--delete \
"${@}"
}
# force the push to the remote repository
gpf() { a__git_push_force "${@}"; }
a__git_push_force() {
a__git_push \
--force \
"${@}"
}
# rebase current branch onto another
grb() { a__git_re_base "${@}"; }
a__git_re_base() {
git \
rebase \
"${@}"
}
# abort current rebase
grba() { a__git_re_base_abort "${@}"; }
a__git_re_base_abort() {
git \
rebase \
--abort \
"${@}"
}
# continue current rebase
grbc() { a__git_re_base_continue "${@}"; }
a__git_re_base_continue() {
git \
rebase \
--continue \
"${@}"
}
# force rebase without fast-forward
grbf() { a__git_re_base_force "${@}"; }
a__git_re_base_force() {
git \
rebase \
--force-rebase \
"${@}"
}
# rebase interactively
grbi() { a__git_re_base_interactive "${@}"; }
a__git_re_base_interactive() {
git \
rebase \
--interactive \
"${@}"
}
# add a new remote repository
grma() { a__git_re_mote_add "${@}"; }
a__git_re_mote_add() {
git \
remote \
add \
"${@}"
}
# list remote repositories
grml() { a__git_re_mote_list "${@}"; }
a__git_re_mote_list() {
git \
remote \
--verbose \
"${@}"
}
# set the location of a remote repository
grmsu() { a__git_re_mote_set_upstream "${@}"; }
a__git_re_mote_set_upstream() {
git \
remote \
set-url \
"${@}"
}
# show connection to a remote repository
grms() { a__git_re_mote_show "${@}"; }
a__git_re_mote_show() {
git \
remote \
show \
"${@}"
}
# remove and add removal to index
grm() { a__git_re_move "${@}"; }
a__git_re_move() {
git \
rm \
"${@}"
}
# remove file(s) from index or move current branch pointer
grs() { a__git_re_set "${@}"; }
a__git_re_set() {
git \
reset \
"${@}"
}
# wipe modifications or reset current branch to another commit
grsh() { a__git_re_set_hard "${@}"; }
a__git_re_set_hard() {
git \
reset \
--hard \
"${@}"
}
# show a commit
gsc() { a__git_show_commit "${@}"; }
a__git_show_commit() {
git \
show \
"${@}"
}
# current state of repository
gs() { a__git_status "${@}"; }
a__git_status() {
git \
status \
--untracked-files="all" \
"${@}"
}
# tag a commit
gt() { a__git_tag "${@}"; }
a__git_tag() {
git \
tag \
"${@}"
}
# delete a tag
gtd() { a__git_tag_delete "${@}"; }
a__git_tag_delete() {
git \
tag \
--delete \
"${@}"
}
# update head ref
gurh() { a__git_update_ref_head "${@}"; }
a__git_update_ref_head() {
if [ -n "${2}" ]; then
git \
update-ref \
"refs/heads/${1}" \
"${2}"
fi
}

12
sh/alias/gpg.sh Normal file
View file

@ -0,0 +1,12 @@
# turn gpg agent off
gak() { a__gpg_agent_kill "${@}"; }
a__gpg_agent_kill() {
gpgconf \
--kill "gpg-agent"
}
# bind gpg agent to current tty
gau() { a__gpg_agent_update "${@}"; }
a__gpg_agent_update() {
rwx_gpg_agent_update
}

9
sh/alias/grep.sh Normal file
View file

@ -0,0 +1,9 @@
# grep from current directory with regex
g() { a__grep "${@}"; }
a__grep() {
grep \
--directories "recurse" \
--line-number \
--regexp \
"${@}"
}

14
sh/alias/kill.sh Normal file
View file

@ -0,0 +1,14 @@
# kill a process by id
k() { a__kill "${@}"; }
a__kill() {
kill \
"${@}"
}
# force kill a process by id
kf() { a__kill_force "${@}"; }
a__kill_force() {
kill \
-9 \
"${@}"
}

14
sh/alias/killall.sh Normal file
View file

@ -0,0 +1,14 @@
# kill all instances of a process by name
ka() { a__kill_all "${@}"; }
a__kill_all() {
killall \
"${@}"
}
# force kill all instances of a process by name
kaf() { a__kill_all_force "${@}"; }
a__kill_all_force() {
killall \
-9 \
"${@}"
}

32
sh/alias/ls.sh Normal file
View file

@ -0,0 +1,32 @@
export LS_COLORS="\
di=0;94\
"
# list current directory’s entries
l() { a__ls "${@}"; }
a__ls() {
ls \
--all \
--color \
-l \
-p \
--time-style "+" \
"${@}"
}
# list timestamps
lt() { a__ls_time "${@}"; }
a__ls_time() {
a__ls \
--time-style "+%Y%m%d-%H%M%S%-:::z" \
"${@}"
}
# list timestamps recent last
ltr() { a__ls_time_reverse "${@}"; }
a__ls_time_reverse() {
a__ls_time \
--reverse \
-t \
"${@}"
}

31
sh/alias/lsblk.sh Normal file
View file

@ -0,0 +1,31 @@
# list block devices
lb() { a__list_block "${@}"; }
a__list_block() {
a__list_block_output \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS" \
"${@}"
}
# base arguments
lbne() { a__list_block_no_empty "${@}"; }
a__list_block_no_empty() {
lsblk \
--noempty \
"${@}"
}
# output arguments
lbo() { a__list_block_output "${@}"; }
a__list_block_output() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
a__list_block_no_empty \
--output "${arguments}"
}

14
sh/alias/mkdir.sh Normal file
View file

@ -0,0 +1,14 @@
# make a directory
md() { a__make_directory "${@}"; }
a__make_directory() {
mkdir \
"${@}"
}
# make a directory after making its parents
mdp() { a__make_directory_parents "${@}"; }
a__make_directory_parents() {
mkdir \
--parents \
"${@}"
}

5
sh/alias/mount.sh Normal file
View file

@ -0,0 +1,5 @@
m() { a__mount "${@}"; }
a__mount() {
mount \
"${@}"
}

7
sh/alias/mv.sh Normal file
View file

@ -0,0 +1,7 @@
# move interactively
mvi() { a__mo_ve_interactive "${@}"; }
a__mo_ve_interactive() {
mv \
--interactive \
"${@}"
}

5
sh/alias/nano.sh Normal file
View file

@ -0,0 +1,5 @@
nn() { a__na_no "${@}"; }
a__na_no() {
nano \
"${@}"
}

5
sh/alias/newsboat.sh Normal file
View file

@ -0,0 +1,5 @@
nb() { a__news_boat "${@}"; }
a__news_boat() {
newsboat \
"${@}"
}

140
sh/alias/overlay.sh Normal file
View file

@ -0,0 +1,140 @@
obm() { a__overlay_bind_mount "${@}"; }
a__overlay_bind_mount() {
local directory
for directory in "dev" "dev/pts" "proc" "sys"; do
if ! mount --bind "/${directory}" "overlay/mount/${directory}"; then
rwx_log_error "Unable to bind mount directory: ${directory}"
return 1
fi
done
}
obu() { a__overlay_bind_unmount "${@}"; }
a__overlay_bind_unmount() {
local directory
for directory in "sys" "proc" "dev/pts" "dev"; do
if ! umount --lazy "overlay/mount/${directory}"; then
rwx_log_error "Unable to bind unmount directory: ${directory}"
return 1
fi
done
}
ocr() { a__overlay_command_root "${@}"; }
a__overlay_command_root() {
chroot \
"overlay/mount" "${@}"
}
ocu() { a__overlay_command_user "${@}"; }
a__overlay_command_user() {
chroot \
--userspec "1000:1000" \
"overlay/mount" "${@}"
}
omm() { a__overlay_mirror_mount "${@}"; }
a__overlay_mirror_mount() {
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
}
omu() { a__overlay_mirror_unmount "${@}"; }
a__overlay_mirror_unmount() {
umount --recursive "overlay/mount/deb"
}
orm() { a__overlay_root_mount "${@}"; }
a__overlay_root_mount() {
local root="${1}"
if [ -z "${root}" ]; then
rwx_log_error "No root target directory"
return 1
fi
root="$(realpath "${root}")"
if ! mkdir "overlay"; then
rwx_log_error "Unable to make overlay directory"
return 2
fi
(
if ! cd "overlay"; then
rwx_log_error "Unable to move into overlay directory"
return 3
fi
local directory
for directory in "lower" "upper" "work" "mount"; do
if ! mkdir --parents "${directory}"; then
rwx_log_error "Unable to make directory: ${directory}"
return 4
fi
done
local file="${root}/filesystem.squashfs"
if ! mount "${file}" "lower"; then
rwx_log_error "Unable to lower mount: ${file}"
return 5
fi
if ! mount \
-o "lowerdir=lower,upperdir=upper,workdir=work" \
-t "overlay" \
"overlay" "mount"; then
rwx_log_error "Unable to overlay mount"
return 6
fi
)
}
ors() { a__overlay_root_squash "${@}"; }
a__overlay_root_squash() {
local directory="${1}"
local file
local level="${2}"
if [ -n "${directory}" ]; then
if mkdir "${directory}"; then
[ -n "${level}" ] || level="18"
for file in "vmlinuz" "initrd.img"; do
cp "overlay/mount/${file}" "${directory}"
done
mksquashfs \
"overlay/mount" "${directory}/filesystem.squashfs" \
-noappend \
-comp "zstd" -Xcompression-level "${level}"
chown --recursive 1000:1000 "${directory}"
fi
fi
}
oru() { a__overlay_root_unmount "${@}"; }
a__overlay_root_unmount() {
(
if ! cd "overlay"; then
rwx_log_error "Unable to move into overlay directory"
return 1
fi
if ! umount "mount"; then
rwx_log_error "Unable to unmount mount directory"
return 2
fi
if ! rmdir "mount"; then
rwx_log_error "Unable to remove mount directory"
return 3
fi
local directory
for directory in "upper" "work"; do
if ! rm --force --recursive "${directory}"; then
rwx_log_error "Unable to remove directory: ${directory}"
return 4
fi
done
if ! umount "lower"; then
rwx_log_error "Unable to unmount lower directory"
return 5
fi
if ! rmdir "lower"; then
rwx_log_error "Unable to remove lower directory"
return 6
fi
)
if ! rmdir "overlay"; then
rwx_log_error "Unable to remove overlay directory"
return 7
fi
}

14
sh/alias/pass.sh Normal file
View file

@ -0,0 +1,14 @@
# display pass entry’s content
p() { a__pass "${@}"; }
a__pass() {
pass \
"${@}"
}
# copy passphrase into clipboard
pc() { a__pass_clip "${@}"; }
a__pass_clip() {
pass \
--clip \
"${@}"
}

7
sh/alias/pgrep.sh Normal file
View file

@ -0,0 +1,7 @@
# look for a string in processes names
pg() { a__proc_grep "${@}"; }
a__proc_grep() {
pgrep \
--list-full \
"${@}"
}

17
sh/alias/pwgen.sh Normal file
View file

@ -0,0 +1,17 @@
# generate passwords
pwg() { a__pass_word_gen "${@}"; }
a__pass_word_gen() {
pwgen \
-1 \
--num-passwords 1048576 \
--secure \
"${@}"
}
# generate passwords with symbols
pwgs() { a__pass_word_gen_symbols "${@}"; }
a__pass_word_gen_symbols() {
a__pass_word_gen \
--symbols \
"${@}"
}

7
sh/alias/rm.sh Normal file
View file

@ -0,0 +1,7 @@
# remove interactively
rmi() { a__re_move_interactive "${@}"; }
a__re_move_interactive() {
rm \
--interactive \
"${@}"
}

27
sh/alias/rsync.sh Normal file
View file

@ -0,0 +1,27 @@
# synchronize
rs() { a__r_sync "${@}"; }
a__r_sync() {
rsync \
--archive \
--no-inc-recursive \
--partial \
--progress \
--verbose \
"${@}"
}
# synchronize and delete after
rsda() { a__r_sync_delete_after "${@}"; }
a__r_sync_delete_after() {
a__r_sync \
--delete-after \
"${@}"
}
# synchronize and delete before
rsdb() { a__r_sync_delete_before "${@}"; }
a__r_sync_delete_before() {
a__r_sync \
--delete-before \
"${@}"
}

29
sh/alias/shell.sh Normal file
View file

@ -0,0 +1,29 @@
# shorten alias
a() {
alias \
"${@}"
}
# swap directory (current ↔ previous)
sd() {
cd \
- ||
return
}
# exit terminal
x() {
exit \
"${@}"
}
[ "${RWX_SHELL}" = "bash" ] || return
# shellcheck disable=SC3033
..() {
cd ..
}
# shellcheck disable=SC3033
...() {
cd ../..
}

31
sh/alias/tar.sh Normal file
View file

@ -0,0 +1,31 @@
tc() { a__tar_create "${@}"; }
a__tar_create() {
a__tar_verbose \
--create \
--auto-compress \
--file \
"${@}"
}
tl() { a__tar_list "${@}"; }
a__tar_list() {
a__tar_verbose \
--list \
--file \
"${@}"
}
tv() { a__tar_verbose "${@}"; }
a__tar_verbose() {
tar \
--verbose \
"${@}"
}
tx() { a__tar_xtract "${@}"; }
a__tar_xtract() {
a__tar_verbose \
--extract \
--file \
"${@}"
}

5
sh/alias/tmux.sh Normal file
View file

@ -0,0 +1,5 @@
tm() { a__t_mux "${@}"; }
a__t_mux() {
tmux \
"${@}"
}

12
sh/alias/tree.sh Normal file
View file

@ -0,0 +1,12 @@
t() { a__tree "${@}"; }
a__tree() {
tree \
"${@}"
}
ta() { a__tree_all "${@}"; }
a__tree_all() {
tree \
-a \
"${@}"
}