feat(enter): restore directory on container enter
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
. /etc/bashrc
|
. /etc/bashrc
|
||||||
|
|
||||||
|
# === container enter logic ===
|
||||||
|
ENTER_DIR="${ENTER_DIR/#\~/$HOME}"
|
||||||
|
[ -d "$ENTER_DIR" ] && cd "$ENTER_DIR"
|
||||||
|
|
||||||
# === environment ===
|
# === environment ===
|
||||||
export EDITOR=nvim \
|
export EDITOR=nvim \
|
||||||
WAYLAND_DISPLAY=wayland-0 \
|
WAYLAND_DISPLAY=wayland-0 \
|
||||||
|
|||||||
2
enter.sh
2
enter.sh
@@ -73,4 +73,4 @@ if [ "$force" = true ] || [ "$(podman container inspect "$name" -f {{.State.Runn
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
podman start "$name" 1>/dev/null
|
podman start "$name" 1>/dev/null
|
||||||
podman exec --detach-keys "ctrl-@" -it "$name" bash -l
|
podman exec -e ENTER_DIR="${PWD/#$HOME/\~}" --detach-keys "ctrl-@" -it "$name" bash -l
|
||||||
|
|||||||
Reference in New Issue
Block a user