Skip to content

Commit

Permalink
Fixes for example "get env" command.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferahl committed Sep 3, 2021
1 parent 553a164 commit bcfd5bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/centry/commands/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# centry.cmd[get:env].option[sanitize]/envName=SANITIZE_OUTPUT
get:env() {
local output
output="$(env | ${SORTED} | grep "${FILTER}")"
output="$(env | ${SORTED:-cat})"
[[ -n "${FILTER}" ]] && output="$(echo "${output:-}" | grep "${FILTER}")"

if [[ ${SANITIZE_OUTPUT} == true ]]; then
echo "${output}" | sed 's/\=.*$/=***/'
Expand Down

0 comments on commit bcfd5bf

Please sign in to comment.