-
-
Notifications
You must be signed in to change notification settings - Fork 79
Environment Variables
Arijit Basu edited this page Apr 3, 2021
·
15 revisions
While calling a command, xplr
set a few environment variables. You can see them by invoking a shell in a directory.
With the default key bindings run xplr
, then press :!
. This will invoke bash
.
Then you can run
env | grep ^XPLR_
Example output:
XPLR_FOCUS_INDEX=0
XPLR_PIPE_SELECTION_OUT=/run/user/1000/xplr/session/234404/pipe/selection_out
XPLR_INPUT_BUFFER=
XPLR_SELECTION=
XPLR_RESULT=/home/sayanarijit/Documents/GitHub/xplr/benches
XPLR_PID=234404
XPLR_PIPE_MSG_IN=/run/user/1000/xplr/session/234404/pipe/msg_in
XPLR_APP_YAML=---
XPLR_FOCUS_PATH=/home/sayanarijit/Documents/GitHub/xplr/benches
XPLR_SESSION_PATH=/run/user/1000/xplr/session/234404
XPLR_DIRECTORY_NODES=/home/sayanarijit/Documents/GitHub/xplr/benches
XPLR_LOGS=
XPLR_PIPE_FOCUS_OUT=/run/user/1000/xplr/session/234404/pipe/focus_out
XPLR_GLOBAL_HELP_MENU=### create file
This will list the variables exported by xplr
. Many variables (e.g. XPLR_LOGS
, XPLR_SELECTION
etc.) are multiline variables. So you need to use the echo -e "$var"
syntax while printing them and read -r var
while reading them.