Skip to content

Instantly share code, notes, and snippets.

@luisadha
Last active November 10, 2022 23:50
Show Gist options
  • Save luisadha/21aa39ea4cdf879b034e5823cca83927 to your computer and use it in GitHub Desktop.
Save luisadha/21aa39ea4cdf879b034e5823cca83927 to your computer and use it in GitHub Desktop.
Used to capture Terminal Emulator settings via initial command, type 'source inpreference.rc'
# Copy pasta ke initial langsung
: ' exit
echo -e "
| Command line: $0
| Terminal type: ${TERM}
| HOME folder: ${HOME}
| Initial command:
0\texit"; history
'
# Ketik
#+exit
#+. /sdcard/.in-preferrc
# Ke initial command
source $0 > /dev/null 2>&1 && until false; do sleep 1; done
export TERM=xterm-256color
export HOME=/sdcard
echo "
+--in-Preferences----------------------------------------------+
| Command line: $0
| Terminal type: ${TERM}
| HOME folder: ${HOME}
|--------------------------------------------------------------+";
su --preserve-environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment