Compare commits
No commits in common. "234190544269539e995296cd1948f56539da5359" and "27b917d7c9dfb168260102858856a2673567d6f0" have entirely different histories.
2341905442
...
27b917d7c9
20 changed files with 29 additions and 28 deletions
|
@ -1,5 +1,5 @@
|
||||||
# change mode to directory
|
# change mode to directory
|
||||||
#= cmd
|
cmd() { a__change_mode_directory "${@}"; }
|
||||||
a__change_mode_directory() {
|
a__change_mode_directory() {
|
||||||
chmod \
|
chmod \
|
||||||
"755" \
|
"755" \
|
||||||
|
@ -7,7 +7,7 @@ a__change_mode_directory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# change mode to file
|
# change mode to file
|
||||||
#= cmf
|
cmf() { a__change_mode_file "${@}"; }
|
||||||
a__change_mode_file() {
|
a__change_mode_file() {
|
||||||
chmod \
|
chmod \
|
||||||
"644" \
|
"644" \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# change owner to root
|
# change owner to root
|
||||||
#= cor
|
cor() { a__change_owner_root "${@}"; }
|
||||||
a__change_owner_root() {
|
a__change_owner_root() {
|
||||||
chown \
|
chown \
|
||||||
"0:0" \
|
"0:0" \
|
||||||
|
@ -7,7 +7,7 @@ a__change_owner_root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# change owner to user
|
# change owner to user
|
||||||
#= cou
|
cou() { a__change_owner_user "${@}"; }
|
||||||
a__change_owner_user() {
|
a__change_owner_user() {
|
||||||
chown \
|
chown \
|
||||||
"1000:1000" \
|
"1000:1000" \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# clear terminal
|
# clear terminal
|
||||||
#= c
|
c() { a__clear "${@}"; }
|
||||||
a__clear() {
|
a__clear() {
|
||||||
clear \
|
clear \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# copy interactively
|
# copy interactively
|
||||||
#= cpi
|
cpi() { a__co_py_interactive "${@}"; }
|
||||||
a__co_py_interactive() {
|
a__co_py_interactive() {
|
||||||
cp \
|
cp \
|
||||||
--interactive \
|
--interactive \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#= em
|
em() { a__e_macs "${@}"; }
|
||||||
a__e_macs() {
|
a__e_macs() {
|
||||||
emacs \
|
emacs \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#= ev
|
ev() { a__e_vince "${@}"; }
|
||||||
a__e_vince() {
|
a__e_vince() {
|
||||||
evince \
|
evince \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# grep from current directory with regex
|
# grep from current directory with regex
|
||||||
#= g
|
g() { a__grep "${@}"; }
|
||||||
a__grep() {
|
a__grep() {
|
||||||
grep \
|
grep \
|
||||||
--directories "recurse" \
|
--directories "recurse" \
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# kill a process by id
|
# kill a process by id
|
||||||
#= k
|
k() { a__kill "${@}"; }
|
||||||
a__kill() {
|
a__kill() {
|
||||||
kill \
|
kill \
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# force kill a process by id
|
# force kill a process by id
|
||||||
#= kf
|
kf() { a__kill_force "${@}"; }
|
||||||
a__kill_force() {
|
a__kill_force() {
|
||||||
kill \
|
kill \
|
||||||
-9 \
|
-9 \
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# kill all instances of a process by name
|
# kill all instances of a process by name
|
||||||
#= ka
|
ka() { a__kill_all "${@}"; }
|
||||||
a__kill_all() {
|
a__kill_all() {
|
||||||
killall \
|
killall \
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# force kill all instances of a process by name
|
# force kill all instances of a process by name
|
||||||
#= kaf
|
kaf() { a__kill_all_force "${@}"; }
|
||||||
a__kill_all_force() {
|
a__kill_all_force() {
|
||||||
killall \
|
killall \
|
||||||
-9 \
|
-9 \
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# make a directory
|
# make a directory
|
||||||
#= md
|
md() { a__make_directory "${@}"; }
|
||||||
a__make_directory() {
|
a__make_directory() {
|
||||||
mkdir \
|
mkdir \
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# make a directory after making its parents
|
# make a directory after making its parents
|
||||||
#= mdp
|
mdp() { a__make_directory_parents "${@}"; }
|
||||||
a__make_directory_parents() {
|
a__make_directory_parents() {
|
||||||
mkdir \
|
mkdir \
|
||||||
--parents \
|
--parents \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#= m
|
m() { a__mount "${@}"; }
|
||||||
a__mount() {
|
a__mount() {
|
||||||
mount \
|
mount \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# move interactively
|
# move interactively
|
||||||
#= mvi
|
mvi() { a__mo_ve_interactive "${@}"; }
|
||||||
a__mo_ve_interactive() {
|
a__mo_ve_interactive() {
|
||||||
mv \
|
mv \
|
||||||
--interactive \
|
--interactive \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#= nn
|
nn() { a__na_no "${@}"; }
|
||||||
a__na_no() {
|
a__na_no() {
|
||||||
nano \
|
nano \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#= nb
|
nb() { a__news_boat "${@}"; }
|
||||||
a__news_boat() {
|
a__news_boat() {
|
||||||
newsboat \
|
newsboat \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# display pass entry’s content
|
# display pass entry’s content
|
||||||
#= p
|
p() { a__pass "${@}"; }
|
||||||
a__pass() {
|
a__pass() {
|
||||||
pass \
|
pass \
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# copy passphrase into clipboard
|
# copy passphrase into clipboard
|
||||||
#= pc
|
pc() { a__pass_clip "${@}"; }
|
||||||
a__pass_clip() {
|
a__pass_clip() {
|
||||||
pass \
|
pass \
|
||||||
--clip \
|
--clip \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# look for a string in processes names
|
# look for a string in processes names
|
||||||
#= pg
|
pg() { a__proc_grep "${@}"; }
|
||||||
a__proc_grep() {
|
a__proc_grep() {
|
||||||
pgrep \
|
pgrep \
|
||||||
--list-full \
|
--list-full \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# generate passwords
|
# generate passwords
|
||||||
#= pwg
|
pwg() { a__pass_word_gen "${@}"; }
|
||||||
a__pass_word_gen() {
|
a__pass_word_gen() {
|
||||||
pwgen \
|
pwgen \
|
||||||
-1 \
|
-1 \
|
||||||
|
@ -9,7 +9,7 @@ a__pass_word_gen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# generate passwords with symbols
|
# generate passwords with symbols
|
||||||
#= pwgs
|
pwgs() { a__pass_word_gen_symbols "${@}"; }
|
||||||
a__pass_word_gen_symbols() {
|
a__pass_word_gen_symbols() {
|
||||||
a__pass_word_gen \
|
a__pass_word_gen \
|
||||||
--symbols \
|
--symbols \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# remove interactively
|
# remove interactively
|
||||||
#= rmi
|
rmi() { a__re_move_interactive "${@}"; }
|
||||||
a__re_move_interactive() {
|
a__re_move_interactive() {
|
||||||
rm \
|
rm \
|
||||||
--interactive \
|
--interactive \
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#= t
|
t() { a__tree "${@}"; }
|
||||||
a__tree() {
|
a__tree() {
|
||||||
tree \
|
tree \
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
#= ta
|
ta() { a__tree_all "${@}"; }
|
||||||
a__tree_all() {
|
a__tree_all() {
|
||||||
tree \
|
tree \
|
||||||
-a \
|
-a \
|
||||||
|
|
|
@ -23,6 +23,8 @@ RWX_LOG_LEVEL=${RWX_LOG_LEVEL_INFO}
|
||||||
# │ log │ log │
|
# │ log │ log │
|
||||||
# ╰─────┴─────╯
|
# ╰─────┴─────╯
|
||||||
|
|
||||||
|
rwx_log() { rwx_log_info "${@}"; }
|
||||||
|
|
||||||
rwx_log_debug() {
|
rwx_log_debug() {
|
||||||
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_DEBUG}" ]; then
|
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_DEBUG}" ]; then
|
||||||
_rwx_log "[DEBUG]" "${@}"
|
_rwx_log "[DEBUG]" "${@}"
|
||||||
|
@ -49,7 +51,6 @@ rwx_log_fatal() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#= rwx_log
|
|
||||||
rwx_log_info() {
|
rwx_log_info() {
|
||||||
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_INFO}" ]; then
|
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_INFO}" ]; then
|
||||||
_rwx_log "" "${@}"
|
_rwx_log "" "${@}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue