android - Customize adb prompt -
how can reduce length of path printed before prompt of shell opened adb shell? problem is long can no longer see commands because doesn't break line automatically. prefer name of current directory or abstract code example.
sh -v on android phone gives me
# copyright (c) 2010 # thorsten glaser <t.glaser@tarent.de> # file provided under same terms mksh. #- # minimal /system/etc/mkshrc android : ${term:=vt100} ${home:=/data} ${mksh:=/system/bin/sh} ${hostname:=android} : ${shell:=$mksh} ${user:=$(typeset x=$(id); x=${x#*\(}; print -r -- ${x%%\)*})} if (( user_id )); ps1='$'; else ps1='#'; fi function precmd { typeset e=$? (( e )) && print -n "$e|" } ps1='$(precmd)$user@$hostname:${pwd:-?} '"$ps1 " export home hostname mksh ps1 shell term user alias l='ls' alias la='l -a' alias ll='l -l' alias lo='l -a -l' p in ~/.bin; [[ -d $p/. ]] || continue [[ :$path: = *:$p:* ]] || path=$p:$path done unset p : place customisations above line
you change ps1 prompt smaller line:
ps1="> " but it'd better instead increase width of window like:
columns=150
Comments
Post a Comment