aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-03-10 10:23:53 -0500
committertdro <tdro@users.noreply.github.com>2022-03-10 10:24:49 -0500
commit4152887cace04372ca91eb9a4fa95dec0f32ab90 (patch)
tree8eaa4bc1ab8dbdeb6401b58a81de9d380f0b1e4e /.bashrc
parent1b3d49273844b493a5c23d5ffa2134418dd34af2 (diff)
downloaddotfiles-4152887cace04372ca91eb9a4fa95dec0f32ab90.tar.gz
dotfiles-4152887cace04372ca91eb9a4fa95dec0f32ab90.tar.bz2
dotfiles-4152887cace04372ca91eb9a4fa95dec0f32ab90.zip
.config/lxc: Bring back user default.conf
Clean up a few lxc helpers
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc15
1 files changed, 8 insertions, 7 deletions
diff --git a/.bashrc b/.bashrc
index 26971eb..fffce01 100644
--- a/.bashrc
+++ b/.bashrc
@@ -92,8 +92,8 @@ alias grep='grep --color=tty -d skip'
alias locate='locate -ie'
alias ls='ls -hN --color=always --group-directories-first'
alias lsblk='lsblk -o NAME,MAJ:MIN,RM,SIZE,FSTYPE,RO,TYPE,MOUNTPOINT,MODEL'
-alias lxc-attach='lxc-attach --clear-env -n'
-alias lxc-ls='lxc-ls -f'
+alias lxc-attach='lxc-attach --clear-env --name'
+alias lxc-ls='lxc-ls --fancy'
alias lynx='lynx -cfg ~/.config/lynx/lynx.cfg'
alias mocp='mocp -M $XDG_CONFIG_HOME/moc'
alias newsboat='newsboat -c $XDG_CONFIG_HOME/newsboat/cache.db -u $XDG_CONFIG_HOME/newsboat/urls -C $XDG_CONFIG_HOME/newsboat/config'
@@ -109,11 +109,12 @@ alias units='units --history "$XDG_CACHE_HOME"/units_history'
nix-which() { readlink "$(type -P "$1")"; }
# lxc helpers
-lxc-copy() { A=$1 && B=$2 && shift 2 && $(type -P lxc-copy) -an "$A" -N "$B" "$@"; }
-lxc-restart() { $(type -P lxc-stop) -kn "$1"; $(type -P lxc-start) -n "$1"; }
-lxc-start() { for container in "$@"; do $(type -P lxc-start) -n "$container"; done }
-lxc-stop() { for container in "$@"; do $(type -P lxc-stop) -kn "$container"; done }
-lxc-destroy() { for container in "$@"; do $(type -P lxc-destroy) -n "$container"; done }
+lxc-copy() { A=$1 && B=$2 && shift 2 && $(type -P lxc-copy) --allowrunning --name "$A" -N "$B" "$@"; }
+lxc-shell() { lxc-attach "$1" -- /bin/sh -c 'export HOME="/root" && . /etc/profile && /bin/sh'; }
+lxc-restart() { $(type -P lxc-stop) --kill --name "$1"; $(type -P lxc-start) -n "$1"; }
+lxc-start() { for container in "$@"; do $(type -P lxc-start) --name "$container"; done }
+lxc-stop() { for container in "$@"; do $(type -P lxc-stop) --kill --name "$container"; done }
+lxc-destroy() { for container in "$@"; do $(type -P lxc-destroy) --name "$container"; done }
# source fzf markers
[ -f "$HOME/.config/fzf/marks.plugin.bash" ] && . "$HOME/.config/fzf/marks.plugin.bash"