mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-25 06:18:48 +00:00
b8b87a6e29
Fixes #21
24 lines
494 B
Bash
Executable File
24 lines
494 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# "irb default strategy"
|
|
#
|
|
# Example irb process with junk variables:
|
|
# irb RBENV_VERSION=1.9.3-p429 GREP_COLOR=34;47 TERM_PROGRAM=Apple_Terminal
|
|
#
|
|
# When executed, the above will fail. This strategy handles that.
|
|
|
|
ORIGINAL_COMMAND="$1"
|
|
DIRECTORY="$2"
|
|
|
|
original_command_wo_junk_vars() {
|
|
echo "$ORIGINAL_COMMAND" |
|
|
sed 's/RBENV_VERSION[^ ]*//' |
|
|
sed 's/GREP_COLOR[^ ]*//' |
|
|
sed 's/TERM_PROGRAM[^ ]*//'
|
|
}
|
|
|
|
main() {
|
|
echo "$(original_command_wo_junk_vars)"
|
|
}
|
|
main
|