Compare commits

..

14 commits

Author SHA1 Message Date
49b9fbe8c3
aliases
All checks were successful
/ job (push) Successful in 4m57s
2025-07-06 07:53:27 +02:00
785b52f4b3
−byobu 2025-07-06 07:46:41 +02:00
f240158cc0
tmux/tma 2025-07-06 07:32:55 +02:00
8a54f3a0d5
tmux/tmk 2025-07-06 07:32:06 +02:00
2e4e827830
tmux/tml 2025-07-06 07:30:42 +02:00
013e1a72cc
tmux/tm 2025-07-06 07:24:26 +02:00
4154a68790
alias/ls 2025-07-06 07:19:58 +02:00
4a89985362
alias/lsblk 2025-07-06 07:17:11 +02:00
840a1747f9
alias/rsync 2025-07-06 07:12:46 +02:00
72b64d4570
alias/tar 2025-07-06 07:10:07 +02:00
d4340a4004
alias/apt 2025-07-06 07:08:19 +02:00
de40382945
alias/btrfs 2025-07-06 07:05:55 +02:00
5d93e311a8
alias/overlay 2025-07-06 07:03:46 +02:00
8911523e83
alias/git,= 2025-07-06 06:59:32 +02:00
13 changed files with 154 additions and 139 deletions

View file

@ -1,5 +1,7 @@
# functions handling apt
# show package information # show package information
acl() { a__apt_cache_list "${@}"; } #= acl
a__apt_cache_list() { a__apt_cache_list() {
apt-cache \ apt-cache \
show \ show \
@ -7,7 +9,7 @@ a__apt_cache_list() {
} }
# package versions policy # package versions policy
acp() { a__apt_cache_policy "${@}"; } #= acp
a__apt_cache_policy() { a__apt_cache_policy() {
apt-cache \ apt-cache \
policy \ policy \
@ -15,23 +17,21 @@ a__apt_cache_policy() {
} }
# search package # search package
acs() { a__apt_cache_search "${@}"; } #= acs
a__apt_cache_search() { a__apt_cache_search() {
apt-cache \ apt-cache \
search \ search \
"${@}" "${@}"
} }
# #= agap
agap() { a__apt_get_auto_purge "${@}"; }
a__apt_get_auto_purge() { a__apt_get_auto_purge() {
apt-get \ apt-get \
autopurge \ autopurge \
"${@}" "${@}"
} }
# #= agar
agar() { a__apt_get_auto_remove "${@}"; }
a__apt_get_auto_remove() { a__apt_get_auto_remove() {
apt-get \ apt-get \
autoremove \ autoremove \
@ -39,7 +39,7 @@ a__apt_get_auto_remove() {
} }
# clean packages cache # clean packages cache
agc() { a__apt_get_clean "${@}"; } #= agc
a__apt_get_clean() { a__apt_get_clean() {
apt-get \ apt-get \
clean \ clean \
@ -47,7 +47,7 @@ a__apt_get_clean() {
} }
# upgrade allowing package installation or removal # upgrade allowing package installation or removal
agfu() { a__apt_get_full_upgrade "${@}"; } #= agfu
a__apt_get_full_upgrade() { a__apt_get_full_upgrade() {
apt-get \ apt-get \
full-upgrade \ full-upgrade \
@ -55,23 +55,21 @@ a__apt_get_full_upgrade() {
} }
# install packages # install packages
agi() { a__apt_get_install "${@}"; } #= agi
a__apt_get_install() { a__apt_get_install() {
apt-get \ apt-get \
install \ install \
"${@}" "${@}"
} }
# #= agp
agp() { a__apt_get_purge "${@}"; }
a__apt_get_purge() { a__apt_get_purge() {
apt-get \ apt-get \
purge \ purge \
"${@}" "${@}"
} }
# #= agr
agr() { a__apt_get_remove "${@}"; }
a__apt_get_remove() { a__apt_get_remove() {
apt-get \ apt-get \
remove \ remove \
@ -79,7 +77,7 @@ a__apt_get_remove() {
} }
# update packages catalog # update packages catalog
agud() { a__apt_get_up_date "${@}"; } #= agud
a__apt_get_up_date() { a__apt_get_up_date() {
apt-get \ apt-get \
update \ update \
@ -87,7 +85,7 @@ a__apt_get_up_date() {
} }
# upgrade forbidding package installation or removal # upgrade forbidding package installation or removal
agug() { a__apt_get_up_grade "${@}"; } #= agug
a__apt_get_up_grade() { a__apt_get_up_grade() {
apt-get \ apt-get \
upgrade \ upgrade \

View file

@ -1,4 +1,6 @@
bfdf() { a__btrfs_filesystem_d_f "${@}"; } # functions to handle btrfs volumes
#= bfdf
a__btrfs_filesystem_d_f() { a__btrfs_filesystem_d_f() {
btrfs \ btrfs \
filesystem \ filesystem \
@ -6,7 +8,7 @@ a__btrfs_filesystem_d_f() {
"${@}" "${@}"
} }
bfdu() { a__btrfs_filesystem_d_u "${@}"; } #= bfdu
a__btrfs_filesystem_d_u() { a__btrfs_filesystem_d_u() {
btrfs \ btrfs \
filesystem \ filesystem \
@ -15,7 +17,7 @@ a__btrfs_filesystem_d_u() {
"${@}" "${@}"
} }
bfu() { a__btrfs_filesystem_usage "${@}"; } #= bfu
a__btrfs_filesystem_usage() { a__btrfs_filesystem_usage() {
btrfs \ btrfs \
filesystem \ filesystem \
@ -23,7 +25,7 @@ a__btrfs_filesystem_usage() {
"${@}" "${@}"
} }
bpg() { a__btrfs_property_get "${@}"; } #= bpg
a__btrfs_property_get() { a__btrfs_property_get() {
btrfs \ btrfs \
property \ property \
@ -31,7 +33,7 @@ a__btrfs_property_get() {
"${@}" "${@}"
} }
bsc() { a__btrfs_subvolume_create "${@}"; } #= bsc
a__btrfs_subvolume_create() { a__btrfs_subvolume_create() {
btrfs \ btrfs \
subvolume \ subvolume \
@ -39,7 +41,7 @@ a__btrfs_subvolume_create() {
"${@}" "${@}"
} }
bsd() { a__btrfs_subvolume_delete "${@}"; } #= bsd
a__btrfs_subvolume_delete() { a__btrfs_subvolume_delete() {
btrfs \ btrfs \
subvolume \ subvolume \
@ -47,7 +49,7 @@ a__btrfs_subvolume_delete() {
"${@}" "${@}"
} }
bsl() { a__btrfs_subvolume_list "${@}"; } #= bsl
a__btrfs_subvolume_list() { a__btrfs_subvolume_list() {
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
btrfs subvolume list "${1}" | btrfs subvolume list "${1}" |
@ -56,7 +58,7 @@ a__btrfs_subvolume_list() {
fi fi
} }
bss() { a__btrfs_subvolume_snapshot "${@}"; } #= bss
a__btrfs_subvolume_snapshot() { a__btrfs_subvolume_snapshot() {
btrfs \ btrfs \
subvolume \ subvolume \
@ -64,7 +66,7 @@ a__btrfs_subvolume_snapshot() {
"${@}" "${@}"
} }
bssr() { a__btrfs_subvolume_snapshot_r "${@}"; } #= bssr
a__btrfs_subvolume_snapshot_r() { a__btrfs_subvolume_snapshot_r() {
btrfs \ btrfs \
subvolume \ subvolume \

View file

@ -1,27 +0,0 @@
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 \
"${@}"
}

View file

@ -8,7 +8,7 @@ C %C(blue)%ci %cn %ce
%B" %B"
# add to index # add to index
ga() { a__git_add "${@}"; } #= ga
a__git_add() { a__git_add() {
git \ git \
add \ add \
@ -16,7 +16,7 @@ a__git_add() {
} }
# add all to index # add all to index
gaa() { a__git_add_all "${@}"; } #= gaa
a__git_add_all() { a__git_add_all() {
git \ git \
add \ add \
@ -25,7 +25,7 @@ a__git_add_all() {
} }
# add parts of all to index # add parts of all to index
gaap() { a__git_add_all_patch "${@}"; } #= gaap
a__git_add_all_patch() { a__git_add_all_patch() {
git \ git \
add \ add \
@ -35,7 +35,7 @@ a__git_add_all_patch() {
} }
# add parts to index # add parts to index
gap() { a__git_add_patch "${@}"; } #= gap
a__git_add_patch() { a__git_add_patch() {
git \ git \
add \ add \
@ -44,7 +44,7 @@ a__git_add_patch() {
} }
# create a branch # create a branch
gb() { a__git_branch "${@}"; } #= gb
a__git_branch() { a__git_branch() {
git \ git \
branch \ branch \
@ -52,7 +52,7 @@ a__git_branch() {
} }
# delete a branch # delete a branch
gbd() { a__git_branch_delete "${@}"; } #= gbd
a__git_branch_delete() { a__git_branch_delete() {
git \ git \
branch \ branch \
@ -61,7 +61,7 @@ a__git_branch_delete() {
} }
# force a branch deletion # force a branch deletion
gbdf() { a__git_branch_delete_force "${@}"; } #= gbdf
a__git_branch_delete_force() { a__git_branch_delete_force() {
git \ git \
branch \ branch \
@ -71,7 +71,7 @@ a__git_branch_delete_force() {
} }
# list branches # list branches
gbl() { a__git_branch_list "${@}"; } #= gbl
a__git_branch_list() { a__git_branch_list() {
git \ git \
branch \ branch \
@ -83,7 +83,7 @@ a__git_branch_list() {
} }
# set the link to a remote branch from a local branch # set the link to a remote branch from a local branch
gbsu() { a__git_branch_set_upstream "${@}"; } #= gbsu
a__git_branch_set_upstream() { a__git_branch_set_upstream() {
git \ git \
branch \ branch \
@ -92,7 +92,7 @@ a__git_branch_set_upstream() {
} }
# switch to a branch or checkout file(s) from a commit # switch to a branch or checkout file(s) from a commit
gc() { a__git_checkout "${@}"; } #= gc
a__git_checkout() { a__git_checkout() {
git \ git \
checkout \ checkout \
@ -100,7 +100,7 @@ a__git_checkout() {
} }
# checkout an orphan branch # checkout an orphan branch
gco() { a__git_checkout_orphan "${@}"; } #= gco
a__git_checkout_orphan() { a__git_checkout_orphan() {
git \ git \
checkout \ checkout \
@ -109,7 +109,7 @@ a__git_checkout_orphan() {
} }
# pick a commit # pick a commit
gcp() { a__git_cherry_pick "${@}"; } #= gcp
a__git_cherry_pick() { a__git_cherry_pick() {
git \ git \
cherry-pick \ cherry-pick \
@ -117,7 +117,7 @@ a__git_cherry_pick() {
} }
# abort the commit pick # abort the commit pick
gcpa() { a__git_cherry_pick_abort "${@}"; } #= gcpa
a__git_cherry_pick_abort() { a__git_cherry_pick_abort() {
git \ git \
cherry-pick \ cherry-pick \
@ -126,7 +126,7 @@ a__git_cherry_pick_abort() {
} }
# continue the commit pick # continue the commit pick
gcpc() { a__git_cherry_pick_continue "${@}"; } #= gcpc
a__git_cherry_pick_continue() { a__git_cherry_pick_continue() {
git \ git \
cherry-pick \ cherry-pick \
@ -135,7 +135,7 @@ a__git_cherry_pick_continue() {
} }
# clean untracked files # clean untracked files
gcf() { a__git_clean_force "${@}"; } #= gcf
a__git_clean_force() { a__git_clean_force() {
git \ git \
clean \ clean \
@ -145,7 +145,7 @@ a__git_clean_force() {
} }
# redo the last commit with a different message # redo the last commit with a different message
gcam() { a__git_commit_amend_message "${@}"; } #= gcam
a__git_commit_amend_message() { a__git_commit_amend_message() {
git \ git \
commit \ commit \
@ -155,7 +155,7 @@ a__git_commit_amend_message() {
} }
# make a root commit # make a root commit
gcem() { a__git_commit_empty_message "${@}"; } #= gcem
a__git_commit_empty_message() { a__git_commit_empty_message() {
git \ git \
commit \ commit \
@ -166,7 +166,7 @@ a__git_commit_empty_message() {
} }
# commit the index # commit the index
gcm() { a__git_commit_message "${@}"; } #= gcm
a__git_commit_message() { a__git_commit_message() {
git \ git \
commit \ commit \
@ -175,7 +175,7 @@ a__git_commit_message() {
} }
# configure the user email # configure the user email
gcue() { a__git_config_user_email "${@}"; } #= gcue
a__git_config_user_email() { a__git_config_user_email() {
git \ git \
config \ config \
@ -184,7 +184,7 @@ a__git_config_user_email() {
} }
# configure the user name # configure the user name
gcun() { a__git_config_user_name "${@}"; } #= gcun
a__git_config_user_name() { a__git_config_user_name() {
git \ git \
config \ config \
@ -193,7 +193,7 @@ a__git_config_user_name() {
} }
# differences from last or between commits # differences from last or between commits
gd() { a__git_diff "${@}"; } #= gd
a__git_diff() { a__git_diff() {
git \ git \
diff \ diff \
@ -201,7 +201,7 @@ a__git_diff() {
} }
# display what is indexed in cache # display what is indexed in cache
gdc() { a__git_diff_cached "${@}"; } #= gdc
a__git_diff_cached() { a__git_diff_cached() {
git \ git \
diff \ diff \
@ -210,7 +210,7 @@ a__git_diff_cached() {
} }
# indexed character-level differences # indexed character-level differences
gdcw() { a__git_diff_cached_word "${@}"; } #= gdcw
a__git_diff_cached_word() { a__git_diff_cached_word() {
git \ git \
diff \ diff \
@ -220,7 +220,7 @@ a__git_diff_cached_word() {
} }
# differences via external tool # differences via external tool
gdt() { a__git_diff_tool "${@}"; } #= gdt
a__git_diff_tool() { a__git_diff_tool() {
git \ git \
difftool \ difftool \
@ -229,7 +229,7 @@ a__git_diff_tool() {
} }
# character-level differences # character-level differences
gdw() { a__git_diff_word "${@}"; } #= gdw
a__git_diff_word() { a__git_diff_word() {
git \ git \
diff \ diff \
@ -238,7 +238,7 @@ a__git_diff_word() {
} }
# fetch from the remote repository # fetch from the remote repository
gf() { a__git_fetch "${@}"; } #= gf
a__git_fetch() { a__git_fetch() {
rwx_gpg_agent_update && rwx_gpg_agent_update &&
git \ git \
@ -249,7 +249,7 @@ a__git_fetch() {
} }
# fetch from remote repository and prune local orphan branches # fetch from remote repository and prune local orphan branches
gfp() { a__git_fetch_prune "${@}"; } #= gfp
a__git_fetch_prune() { a__git_fetch_prune() {
a__git_fetch \ a__git_fetch \
--prune \ --prune \
@ -257,7 +257,7 @@ a__git_fetch_prune() {
} }
# garbage collect all orphan commits # garbage collect all orphan commits
ggc() { a__git_garbage_collect "${@}"; } #= ggc
a__git_garbage_collect() { a__git_garbage_collect() {
git \ git \
reflog \ reflog \
@ -271,7 +271,7 @@ a__git_garbage_collect() {
} }
# initialize a new repository # initialize a new repository
gi() { a__git_init "${@}"; } #= gi
a__git_init() { a__git_init() {
git \ git \
init \ init \
@ -279,7 +279,7 @@ a__git_init() {
} }
# initialize a new bare repository # initialize a new bare repository
gib() { a__git_init_bare "${@}"; } #= gib
a__git_init_bare() { a__git_init_bare() {
git \ git \
init \ init \
@ -288,7 +288,7 @@ a__git_init_bare() {
} }
# log history # log history
gl() { a__git_log "${@}"; } #= gl
a__git_log() { a__git_log() {
git \ git \
log \ log \
@ -300,7 +300,7 @@ a__git_log() {
} }
# log all history # log all history
gla() { a__git_log_all "${@}"; } #= gla
a__git_log_all() { a__git_log_all() {
a__git_log \ a__git_log \
--all \ --all \
@ -308,7 +308,7 @@ a__git_log_all() {
} }
# log all history as oneline # log all history as oneline
glao() { a__git_log_all_oneline "${@}"; } #= glao
a__git_log_all_oneline() { a__git_log_all_oneline() {
a__git_log_all \ a__git_log_all \
--oneline \ --oneline \
@ -316,7 +316,7 @@ a__git_log_all_oneline() {
} }
# log all history with patches # log all history with patches
glap() { a__git_log_all_patch "${@}"; } #= glap
a__git_log_all_patch() { a__git_log_all_patch() {
a__git_log \ a__git_log \
--all \ --all \
@ -325,7 +325,7 @@ a__git_log_all_patch() {
} }
# log history as oneline # log history as oneline
glo() { a__git_log_oneline "${@}"; } #= glo
a__git_log_oneline() { a__git_log_oneline() {
a__git_log \ a__git_log \
--oneline \ --oneline \
@ -333,7 +333,7 @@ a__git_log_oneline() {
} }
# log history with patches # log history with patches
glp() { a__git_log_patch "${@}"; } #= glp
a__git_log_patch() { a__git_log_patch() {
a__git_log \ a__git_log \
--patch \ --patch \
@ -341,7 +341,7 @@ a__git_log_patch() {
} }
# fast-forward merge to remote branch # fast-forward merge to remote branch
gm() { a__git_merge "${@}"; } #= gm
a__git_merge() { a__git_merge() {
git \ git \
merge \ merge \
@ -350,7 +350,7 @@ a__git_merge() {
} }
# abort the current merge commit # abort the current merge commit
gma() { a__git_merge_abort "${@}"; } #= gma
a__git_merge_abort() { a__git_merge_abort() {
git \ git \
merge \ merge \
@ -359,7 +359,7 @@ a__git_merge_abort() {
} }
# do a merge commit # do a merge commit
gmc() { a__git_merge_commit "${@}"; } #= gmc
a__git_merge_commit() { a__git_merge_commit() {
git \ git \
merge \ merge \
@ -369,7 +369,7 @@ a__git_merge_commit() {
} }
# squash a branch and index its modifications # squash a branch and index its modifications
gms() { a__git_merge_squash "${@}"; } #= gms
a__git_merge_squash() { a__git_merge_squash() {
git \ git \
merge \ merge \
@ -378,7 +378,7 @@ a__git_merge_squash() {
} }
# merge via external tool # merge via external tool
gmt() { a__git_merge_tool "${@}"; } #= gmt
a__git_merge_tool() { a__git_merge_tool() {
git \ git \
mergetool \ mergetool \
@ -386,7 +386,7 @@ a__git_merge_tool() {
} }
# push to the remote repository # push to the remote repository
gp() { a__git_push "${@}"; } #= gp
a__git_push() { a__git_push() {
rwx_gpg_agent_update && rwx_gpg_agent_update &&
git \ git \
@ -397,7 +397,7 @@ a__git_push() {
} }
# delete from the remote repository # delete from the remote repository
gpd() { a__git_push_delete "${@}"; } #= gpd
a__git_push_delete() { a__git_push_delete() {
git \ git \
push \ push \
@ -406,7 +406,7 @@ a__git_push_delete() {
} }
# force the push to the remote repository # force the push to the remote repository
gpf() { a__git_push_force "${@}"; } #= gpf
a__git_push_force() { a__git_push_force() {
a__git_push \ a__git_push \
--force \ --force \
@ -414,7 +414,7 @@ a__git_push_force() {
} }
# rebase current branch onto another # rebase current branch onto another
grb() { a__git_re_base "${@}"; } #= grb
a__git_re_base() { a__git_re_base() {
git \ git \
rebase \ rebase \
@ -422,7 +422,7 @@ a__git_re_base() {
} }
# abort current rebase # abort current rebase
grba() { a__git_re_base_abort "${@}"; } #= grba
a__git_re_base_abort() { a__git_re_base_abort() {
git \ git \
rebase \ rebase \
@ -431,7 +431,7 @@ a__git_re_base_abort() {
} }
# continue current rebase # continue current rebase
grbc() { a__git_re_base_continue "${@}"; } #= grbc
a__git_re_base_continue() { a__git_re_base_continue() {
git \ git \
rebase \ rebase \
@ -440,7 +440,7 @@ a__git_re_base_continue() {
} }
# force rebase without fast-forward # force rebase without fast-forward
grbf() { a__git_re_base_force "${@}"; } #= grbf
a__git_re_base_force() { a__git_re_base_force() {
git \ git \
rebase \ rebase \
@ -449,7 +449,7 @@ a__git_re_base_force() {
} }
# rebase interactively # rebase interactively
grbi() { a__git_re_base_interactive "${@}"; } #= grbi
a__git_re_base_interactive() { a__git_re_base_interactive() {
git \ git \
rebase \ rebase \
@ -458,7 +458,7 @@ a__git_re_base_interactive() {
} }
# add a new remote repository # add a new remote repository
grma() { a__git_re_mote_add "${@}"; } #= grma
a__git_re_mote_add() { a__git_re_mote_add() {
git \ git \
remote \ remote \
@ -467,7 +467,7 @@ a__git_re_mote_add() {
} }
# list remote repositories # list remote repositories
grml() { a__git_re_mote_list "${@}"; } #= grml
a__git_re_mote_list() { a__git_re_mote_list() {
git \ git \
remote \ remote \
@ -476,7 +476,7 @@ a__git_re_mote_list() {
} }
# set the location of a remote repository # set the location of a remote repository
grmsu() { a__git_re_mote_set_upstream "${@}"; } #= grmsu
a__git_re_mote_set_upstream() { a__git_re_mote_set_upstream() {
git \ git \
remote \ remote \
@ -485,7 +485,7 @@ a__git_re_mote_set_upstream() {
} }
# show connection to a remote repository # show connection to a remote repository
grms() { a__git_re_mote_show "${@}"; } #= grms
a__git_re_mote_show() { a__git_re_mote_show() {
git \ git \
remote \ remote \
@ -494,7 +494,7 @@ a__git_re_mote_show() {
} }
# remove and add removal to index # remove and add removal to index
grm() { a__git_re_move "${@}"; } #= grm
a__git_re_move() { a__git_re_move() {
git \ git \
rm \ rm \
@ -502,7 +502,7 @@ a__git_re_move() {
} }
# remove file(s) from index or move current branch pointer # remove file(s) from index or move current branch pointer
grs() { a__git_re_set "${@}"; } #= grs
a__git_re_set() { a__git_re_set() {
git \ git \
reset \ reset \
@ -510,7 +510,7 @@ a__git_re_set() {
} }
# wipe modifications or reset current branch to another commit # wipe modifications or reset current branch to another commit
grsh() { a__git_re_set_hard "${@}"; } #= grsh
a__git_re_set_hard() { a__git_re_set_hard() {
git \ git \
reset \ reset \
@ -519,7 +519,7 @@ a__git_re_set_hard() {
} }
# current state of repository # current state of repository
gs() { a__git_status "${@}"; } #= gs
a__git_status() { a__git_status() {
git \ git \
status \ status \
@ -528,7 +528,7 @@ a__git_status() {
} }
# show a commit # show a commit
#( gsc #= gsc
a__git_show_commit() { a__git_show_commit() {
git \ git \
show \ show \
@ -536,7 +536,7 @@ a__git_show_commit() {
} }
# tag a commit # tag a commit
gt() { a__git_tag "${@}"; } #= gt
a__git_tag() { a__git_tag() {
git \ git \
tag \ tag \
@ -544,7 +544,7 @@ a__git_tag() {
} }
# delete a tag # delete a tag
gtd() { a__git_tag_delete "${@}"; } #= gtd
a__git_tag_delete() { a__git_tag_delete() {
git \ git \
tag \ tag \
@ -553,7 +553,7 @@ a__git_tag_delete() {
} }
# update head ref # update head ref
gurh() { a__git_update_ref_head "${@}"; } #= gurh
a__git_update_ref_head() { a__git_update_ref_head() {
if [ -n "${2}" ]; then if [ -n "${2}" ]; then
git \ git \

View file

@ -1,9 +1,13 @@
# list files
# list colors
# * lighter blue for directories
export LS_COLORS="\ export LS_COLORS="\
di=0;94\ di=0;94\
" "
# list current directory’s entries # list current directory’s entries
l() { a__ls "${@}"; } #= l
a__ls() { a__ls() {
ls \ ls \
--all \ --all \
@ -15,7 +19,7 @@ a__ls() {
} }
# list timestamps # list timestamps
lt() { a__ls_time "${@}"; } #= lt
a__ls_time() { a__ls_time() {
a__ls \ a__ls \
--time-style "+%Y%m%d-%H%M%S%-:::z" \ --time-style "+%Y%m%d-%H%M%S%-:::z" \
@ -23,7 +27,7 @@ a__ls_time() {
} }
# list timestamps recent last # list timestamps recent last
ltr() { a__ls_time_reverse "${@}"; } #= ltr
a__ls_time_reverse() { a__ls_time_reverse() {
a__ls_time \ a__ls_time \
--reverse \ --reverse \

View file

@ -1,5 +1,7 @@
# handle block devices
# list block devices # list block devices
lb() { a__list_block "${@}"; } #= lb
a__list_block() { a__list_block() {
a__list_block_output \ a__list_block_output \
"SIZE" \ "SIZE" \
@ -11,7 +13,7 @@ a__list_block() {
} }
# base arguments # base arguments
lbne() { a__list_block_no_empty "${@}"; } #= lbne
a__list_block_no_empty() { a__list_block_no_empty() {
lsblk \ lsblk \
--noempty \ --noempty \
@ -19,7 +21,7 @@ a__list_block_no_empty() {
} }
# output arguments # output arguments
lbo() { a__list_block_output "${@}"; } #= lbo
a__list_block_output() { a__list_block_output() {
local argument local argument
local arguments="NAME" local arguments="NAME"

View file

@ -1,4 +1,6 @@
obm() { a__overlay_bind_mount "${@}"; } # overlay functions to manipulate squashfs manually
#= obm
a__overlay_bind_mount() { a__overlay_bind_mount() {
local directory local directory
for directory in "dev" "dev/pts" "proc" "sys"; do for directory in "dev" "dev/pts" "proc" "sys"; do
@ -9,7 +11,7 @@ a__overlay_bind_mount() {
done done
} }
obu() { a__overlay_bind_unmount "${@}"; } #= obu
a__overlay_bind_unmount() { a__overlay_bind_unmount() {
local directory local directory
for directory in "sys" "proc" "dev/pts" "dev"; do for directory in "sys" "proc" "dev/pts" "dev"; do
@ -20,30 +22,30 @@ a__overlay_bind_unmount() {
done done
} }
ocr() { a__overlay_command_root "${@}"; } #= ocr
a__overlay_command_root() { a__overlay_command_root() {
chroot \ chroot \
"overlay/mount" "${@}" "overlay/mount" "${@}"
} }
ocu() { a__overlay_command_user "${@}"; } #= ocu
a__overlay_command_user() { a__overlay_command_user() {
chroot \ chroot \
--userspec "1000:1000" \ --userspec "1000:1000" \
"overlay/mount" "${@}" "overlay/mount" "${@}"
} }
omm() { a__overlay_mirror_mount "${@}"; } #= omm
a__overlay_mirror_mount() { a__overlay_mirror_mount() {
mount --make-rslave --rbind "/deb" "overlay/mount/deb" mount --make-rslave --rbind "/deb" "overlay/mount/deb"
} }
omu() { a__overlay_mirror_unmount "${@}"; } #= omu
a__overlay_mirror_unmount() { a__overlay_mirror_unmount() {
umount --recursive "overlay/mount/deb" umount --recursive "overlay/mount/deb"
} }
orm() { a__overlay_root_mount "${@}"; } #= orm
a__overlay_root_mount() { a__overlay_root_mount() {
local root="${1}" local root="${1}"
if [ -z "${root}" ]; then if [ -z "${root}" ]; then
@ -82,7 +84,7 @@ a__overlay_root_mount() {
) )
} }
ors() { a__overlay_root_squash "${@}"; } #= ors
a__overlay_root_squash() { a__overlay_root_squash() {
local directory="${1}" local directory="${1}"
local file local file
@ -102,7 +104,7 @@ a__overlay_root_squash() {
fi fi
} }
oru() { a__overlay_root_unmount "${@}"; } #= oru
a__overlay_root_unmount() { a__overlay_root_unmount() {
( (
if ! cd "overlay"; then if ! cd "overlay"; then

View file

@ -1,5 +1,7 @@
# shortcuts for rsync
# synchronize # synchronize
rs() { a__r_sync "${@}"; } #= rs
a__r_sync() { a__r_sync() {
rsync \ rsync \
--archive \ --archive \
@ -11,7 +13,7 @@ a__r_sync() {
} }
# synchronize and delete after # synchronize and delete after
rsda() { a__r_sync_delete_after "${@}"; } #= rsda
a__r_sync_delete_after() { a__r_sync_delete_after() {
a__r_sync \ a__r_sync \
--delete-after \ --delete-after \
@ -19,7 +21,7 @@ a__r_sync_delete_after() {
} }
# synchronize and delete before # synchronize and delete before
rsdb() { a__r_sync_delete_before "${@}"; } #= rsdb
a__r_sync_delete_before() { a__r_sync_delete_before() {
a__r_sync \ a__r_sync \
--delete-before \ --delete-before \

View file

@ -1,4 +1,6 @@
tc() { a__tar_create "${@}"; } # functions to handle tar
#= tc
a__tar_create() { a__tar_create() {
a__tar_verbose \ a__tar_verbose \
--create \ --create \
@ -7,7 +9,7 @@ a__tar_create() {
"${@}" "${@}"
} }
tl() { a__tar_list "${@}"; } #= tl
a__tar_list() { a__tar_list() {
a__tar_verbose \ a__tar_verbose \
--list \ --list \
@ -15,14 +17,14 @@ a__tar_list() {
"${@}" "${@}"
} }
tv() { a__tar_verbose "${@}"; } #= tv
a__tar_verbose() { a__tar_verbose() {
tar \ tar \
--verbose \ --verbose \
"${@}" "${@}"
} }
tx() { a__tar_xtract "${@}"; } #= tx
a__tar_xtract() { a__tar_xtract() {
a__tar_verbose \ a__tar_verbose \
--extract \ --extract \

View file

@ -1,4 +1,6 @@
tm() { a__t_mux "${@}"; } # handle tmux
#= tm
a__t_mux() { a__t_mux() {
tmux \ tmux \
"${@}" "${@}"

View file

@ -27,7 +27,7 @@ BEGIN {
RE_END = RE_SPACES "$" RE_END = RE_SPACES "$"
RE_FUNC = RE_SPACES "\\(" RE_SPACES "\\)" RE_SPACES "{" RE_FUNC = RE_SPACES "\\(" RE_SPACES "\\)" RE_SPACES "{"
RE_ALIAS = RE_BEGIN "#\\(" RE_SPACES RE_VAR RE_END RE_ALIAS = RE_BEGIN "#=" RE_SPACES RE_VAR RE_END
RE_CONSTANT = RE_BEGIN RE_CONST RE_SET RE_END RE_CONSTANT = RE_BEGIN RE_CONST RE_SET RE_END
RE_DOC = RE_BEGIN "#" RE_SPACE RE_ANY RE_END RE_DOC = RE_BEGIN "#" RE_SPACE RE_ANY RE_END
RE_FUNCTION = RE_BEGIN RE_VAR RE_FUNC RE_END RE_FUNCTION = RE_BEGIN RE_VAR RE_FUNC RE_END
@ -47,7 +47,7 @@ BEGIN {
} else if (match($0, RE_FUNCTION, m)) { } else if (match($0, RE_FUNCTION, m)) {
n = split(doc, array, "\n") n = split(doc, array, "\n")
for (i = 1; i<= n; i++) { for (i = 1; i<= n; i++) {
print array[i] "() { " m[1] " \"${@}\" ; }" print array[i] " = " m[1]
} }
reset() reset()
} else { } else {

View file

@ -189,7 +189,7 @@ rwx_parse_code() {
local line local line
RWX_ALIASES="$(rwx_parse_aliases)" RWX_ALIASES="$(rwx_parse_aliases)"
while IFS= read -r line; do while IFS= read -r line; do
eval "${line}" eval "${line/ = /() { } \"\${@}\"; }"
done <<EOF done <<EOF
${RWX_ALIASES} ${RWX_ALIASES}
EOF EOF

View file

@ -2,6 +2,34 @@
# │ tmux │ # │ tmux │
# ╰──────╯ # ╰──────╯
# attach
#= tma
rwx_tmux_attach() {
local server="${1}"
if [ "${server}" ]; then
tmux -L "${server}" attach-session
else
rwx_tmux_list
fi
}
# kill
#= tmk
rwx_tmux_kill() {
local server="${1}"
if [ "${server}" ]; then
tmux -L "${server}" kill-server 2>"/dev/null"
else
rwx_tmux_list
fi
}
# list
#= tml
rwx_tmux_list() {
ls "/tmp/tmux-$(id --user)"
}
# ╭──────┬───────╮ # ╭──────┬───────╮
# │ tmux │ setup │ # │ tmux │ setup │
# ╰──────┴───────╯ # ╰──────┴───────╯