<!here> office hours is starting in 30 minutes! Re...
# office-hours
z
@here office hours is starting in 30 minutes! Remember to post your questions here.
w
atmos feature request (looking for feedback) - I love the [terminal] UI [in the geodesic container] and have been using it a lot. I wanted to get feedback on adding the last executed command to the bash history. The end goal / user experience is for users run
atmos
, select a command, stack, and component, and execute their combinations. Then, a user can hit 'up' (keyboard, up arrow key) and rerun the last executed command, hit up again, and get
atmos
.
e
Hrm... not quite following. This is for #geodesic no?
@Jeremy G (Cloud Posse) ☝️
w
Maybe a picture would help fill some details, I use atmos terminal ui to select the command, stack, and component combination. In this case,
atmos_1.60.0_linux_arm64 terraform plan ssm-parameters --stack stage
And when I hit the up arrow on my keyboard to go through the bash history of past commands, I get this, which makes sense because I ran atmos to access the terminal ui.
Copy code
atmos
As a user, I'd like to have atmos or geodesic (not sure which one makes sense) append to the bash history, so that my bash history looks like,
Copy code
atmos 
atmos terraform plan ssm-parameters --stack stage
e
Aha, that could be tricky to do; the bash history and commands executed by atmos are different. Commands executed by atmos are not run in an interactive subshell, so there won't be history. While a custom solution could be implemented that would work in Geodesic (e.g. by literally modifing the bash history file), any running shell wouldn't see the history.
I don't believe there's a solution that would work
Btw, I suggest installing the nerd fonts
🙌 1
image.png
w
cool, thanks for the quick feedback. Is it possible for atmos to set an env var or something that a bash function to look at to get the last run value?
e
No process in linux can affect the environment of a parent process
Atmos can set environment variables of subprocesses (and supports it)
🙌 1
j
@Erik Osterman (Cloud Posse) @Andriy Knysh (Cloud Posse) Atmos could store the history of interactive commands in its own file under
$XDG_STATE_HOME
. Then it would be a 2-step process: up to run
atmos
, then up to run the last
atmos
interactive command.