Pẹlu ebute: Imudarasi hihan ti itọnisọna naa

Emi li ọkan ninu awọn ti o nifẹ lati lo ebute naa. Mo ro pe gbogbo awọn olumulo ti GNU / Lainos ni aaye kan wọn ko le gbe laisi rẹ, nitori pe nkan ti window ti o kun fun awọn lẹta jẹ ki igbesi aye rọrun pupọ fun wa, otun?

Ṣugbọn a le ṣe ki o dabi ẹni ti o lẹwa diẹ ju aiyipada lọ. Apẹẹrẹ ti eyi ni a le rii (ati gbasilẹ) lati iri-wo. Awọn imọran ti Emi yoo fi han ọ ni isalẹ ni lati fi ebute wa silẹ pẹlu irisi atẹle:

Bi o ti le ri, awọn pipaṣẹ lati ṣiṣẹ o si fi sii laarin aṣẹ kọọkan a Ago pẹlu akoko eto.

Bawo ni MO ṣe le ṣe?

A ṣii olootu ọrọ kan (apẹẹrẹ Gedit) a si fi sinu:

# Fill with minuses
# (this is recalculated every time the prompt is shown in function prompt_command):

fill="--- "
reset_style='\[\033[00m\]'
status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
prompt_style=$reset_style
command_style=$reset_style'\[\033[1;29m\]' # bold black
# Prompt variable:
PS1="$status_style"'$fill \t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\u@\h:\w\$'"$command_style "
# Reset color for command output
# (this one is invoked every time before a command is executed):
trap 'echo -ne "\e[0m"' DEBUG
function prompt_command {
# create a $fill of all screen width minus the time string and a space:
let fillsize=${COLUMNS}-9
fill=""
while [ "$fillsize" -gt "0" ] do
fill="-${fill}" # fill with underscores to work on
let fillsize=${fillsize}-1
done
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
bname=`basename "${PWD/$HOME/~}"`
echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
;;
*)
;;
esac
}
PROMPT_COMMAND=prompt_command

A tọju rẹ sinu inu wa / ile pẹlu orukọ .bash_ps2 fun apere. Lẹhinna a ṣii wa .bashrc a si fikun:

if [ -f "$HOME/.bash_ps2" ]; then
. "$HOME/.bash_ps2"
fi

A ṣii ebute kan ati pe a le wo awọn ayipada 😀

 

Ti ri ninu: Eniyan.


Awọn akoonu ti nkan naa faramọ awọn ilana wa ti awọn ilana olootu. Lati jabo aṣiṣe kan tẹ nibi.

Awọn asọye 17, fi tirẹ silẹ

Fi ọrọ rẹ silẹ

Adirẹsi imeeli rẹ yoo ko le ṣe atejade. O beere aaye ti wa ni samisi pẹlu *

*

*

  1. Lodidi fun data naa: Miguel Ángel Gatón
  2. Idi ti data naa: SPAM Iṣakoso, iṣakoso ọrọ asọye.
  3. Ofin: Iyọọda rẹ
  4. Ibaraẹnisọrọ data: Awọn data kii yoo ni ifọrọhan si awọn ẹgbẹ kẹta ayafi nipasẹ ọranyan ofin.
  5. Ibi ipamọ data: Alaye data ti o gbalejo nipasẹ Awọn nẹtiwọọki Occentus (EU)
  6. Awọn ẹtọ: Ni eyikeyi akoko o le ni opin, gba pada ki o paarẹ alaye rẹ.

  1.   Luweeds wi

    O ṣeun fun bulọọgi naa ni akọkọ ati ibeere kan, ṣe eyikeyi aye lati ṣe akanṣe xterm tabi lxterminal ni ikọja awọ ti ọrọ ati abẹlẹ? (Wọn jẹ awọn ebute ti Mo lo julọ).
    O ṣeun!

  2.   Eduardo wi

    GENIALLLLLLLLLLLLLL 🙂

    Mo gbiyanju ni ọsẹ kan sẹyin nigbati Mo ka akọle yii ni bulọọgi miiran, ṣugbọn nitori iṣoro pẹlu awọn agbasọ ninu ohun ti o ni lati ṣafikun si .bashrc Nko le lo. Bayi o ṣiṣẹ ni deede fun mi akọkọ.

    O ṣeun

    1.    KZKG ^ Gaara wi

      Igbadun kan lati mọ pe o ṣe ohun ti o fẹ 😉
      Dahun pẹlu ji

  3.   Taregon wi

    :] o dara ti o ba ṣe ohun ti Mo ro pe Mo fojuinu ... weeee, Mo fi sii ni ipari ose yii 😀

    1.    KZKG ^ Gaara wi

      Ni otitọ Mo ti ni ilọsiwaju rẹ hehe ... Mo fi awọn awọ diẹ sii ati pe o dara julọ, Emi yoo ṣe ifiweranṣẹ ifiweranṣẹ awọn ilọsiwaju mi ​​ati awọn iyipada mi 😉

      Ṣatunkọ: Dipo ki o fi iyẹn sii .bash_ps2 fi eyi miiran si: http://paste.desdelinux.net/paste/6

      1.    Eduardo wi

        Mo ni aṣiṣe lori awọn ila 13 ati 34.

        1.    elav <° Lainos wi

          A ti wa tẹlẹ 2 😀

      2.    ìgboyà wi

        Fokii, miiran komputa pirogirama ...

        1.    KZKG ^ Gaara wi

          Mo fi koodu silẹ nibi, Emi ko mọ idi ti o fi fun wọn ni aṣiṣe ... o_0U ṣiṣẹ daradara fun mi:
          # Fill with minuses
          # (this is recalculated every time the prompt is shown in function prompt_command):

          fill="--- "
          reset_style='\[\033[00m\]'
          status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
          prompt_style=$reset_style
          command_style=$reset_style'\[\033[1;29m\]' # bold black
          # Prompt variable:
          PS1="$status_style"'$fill \t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m$
          # Reset color for command output
          # (this one is invoked every time before a command is executed):
          trap 'echo -ne "\e[0m"' DEBUG
          function prompt_command {
          # create a $fill of all screen width minus the time string and a space:
          let fillsize=${COLUMNS}-9
          fill=""
          while [ "$fillsize" -gt "0" ]
          do
          fill="-${fill}" # fill with underscores to work on
          let fillsize=${fillsize}-1
          done
          # If this is an xterm set the title to user@host:dir
          case "$TERM" in
          xterm*|rxvt*)
          bname=`basename "${PWD/$HOME/~}"`
          echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
          ;;
          *)
          ;;
          esac
          }
          PROMPT_COMMAND=prompt_command

  4.   newbie wi

    O dara julọ eyi, Mo kan danwo rẹ o ṣiṣẹ 100% ubuntu 11.10

    Ikini !!

  5.   Rob wi

    O dara, Mo tun ni aṣiṣe lori awọn ila 13 ati 34

    laini 13: EOF airotẹlẹ lakoko ti n wa ibaramu “
    laini 34: aṣiṣe syntactic: ipari faili naa ko nireti

    Mo lo mint Mint 11 lxde fun ohun ti o tọ.

    Saludos!

  6.   Jimmingking wi

    O n ṣiṣẹ 100% pẹlu olumulo deede, ṣugbọn akoko ti o di alabojuto o da iṣẹ duro, ko ṣe nkankan. Mo gboju le won o rọrun, ṣugbọn Emi ko mọ bi a ṣe ṣe pupọ, eyikeyi ojutu?

    1.    KZKG ^ Gaara wi

      Ohun ti o fi sinu rẹ .bashrc, o gbọdọ tun fi sii gbongbo /.bashrc
      Ṣe idanwo naa ki o sọ fun wa bawo ni 🙂

      Ikini 😀

      1.    Jimmingking wi

        O ṣiṣẹ ni pipe, Emi ko mọ bii Emi ko gbiyanju rẹ ṣaaju beere. e dupe

        1.    KZKG ^ Gaara <° Lainos wi

          Nah maṣe yọ ara rẹ lẹnu 🙂

  7.   angẹli wi

    Hey ọrẹ, ti o ba yoo ran mi lọwọ jọwọ Mo gbiyanju o ṣugbọn iyika ko han ati pe o tun wa ni dudu, Mo lo fedora19, aago ti o ba farahan ... sibẹ o ṣeun pupọ fun ilowosi rẹ 🙂

  8.   Miguel wi

    Njẹ iṣẹ kanna ni Debian ???