Set GPG_TTY for terminal sessions
This commit is contained in:
@@ -21,6 +21,7 @@ and adds `bin/` to PATH. `$LWS` points to repo root.
|
||||
- `can_run <cmd>` — check if command is available
|
||||
- `is_slow_init` / `is_fast_init` — check `LWS_FAST` mode
|
||||
- `is_interactive_shell` — true when `[[ $- == *i* ]]`
|
||||
- `is_stdin_terminal` — true when stdin is a terminal (`tty` would return a device, not `not a tty`)
|
||||
- `is_wsl` — detect WSL environment
|
||||
- `is_ssh_session` — true when logged in over SSH
|
||||
- `true_false <val>` — normalize `1/true/yes` to boolean
|
||||
|
||||
@@ -9,6 +9,10 @@ function is_interactive_shell() {
|
||||
[[ $- == *i* ]]
|
||||
}
|
||||
|
||||
function is_stdin_terminal() {
|
||||
[[ -t 0 ]]
|
||||
}
|
||||
|
||||
function is_fast_init() {
|
||||
(( $LWS_FAST ))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user