[Linux] Re: lpsconf

---------

New Message Reply About this list Date view Thread view Subject view Author view

From: Volkan YAZICI (volkany@celiknet.com)
Date: Wed 19 Jun 2002 - 18:12:21 EEST


~] -- Binary/unsupported file stripped by Ecartis --
~] -- Type: application/octet-stream
~] -- File: lpsconf

Ecartis'in hismina ugradim
neyse dosya burda:

########### HEAD: Lame PS1, PS2 Configurator ###########
#------------------------------------------------------#

# Please enter the maximum directory path length
# which would be shown under PS2
max_dir_len=15

# Chose your suffix that will be printed before
# viewing a directory path bigger than max_dir_len
# characters under PS2
suffix="<"

# Please don't edit anything below if nothing
# happens strange...

dir=`pwd | sed "s#"${HOME}"#~#g"`
user=`whoami`
host=`uname -n`
line_len=`tput cols`

let max_dir_len=$(( ${max_dir_len} - ${#suffix} ))

if [ ${#dir} -gt "$max_dir_len" ]
then
        will_be_deleted=$(( ${#dir} - $max_dir_len ))
        new_dir="${suffix}${dir:$will_be_deleted}"
else
        new_dir=$dir
fi

# If this script doesn't work please try to replace
# the PS2 line below with PS1
export PS2="${user}@${host}:${new_dir}\$ "

# If you have another prompt commands out of these
# ones you could add them here seperated with a
# `;` sign like:
# Example: PROMPT_COMMAND="date ; source ${HOME}/.bashrc"
PROMPT_COMMAND="source ${HOME}/.bashrc"

# Trying to let some variables for their freedom...
# If you have a memory problem in your system you
# could comment these unset lines for more speed
unset max_dir_len suffix
unset dir user host line_len will_be_deleted new_dir

#------------------------------------------------------#
########### TOE: Lame PS1, PS2 Configurator ############

umarim begenirsiniz
iyi calismalar

-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE9EJ9cxaXLCX9aITcRAmCRAKCfHpg255GbLjGxPF8UCHe+6GsUggCfdQB0
0PluRP2SBeoevHyeayqLYiI=
=jsRn
-----END PGP SIGNATURE-----

-- Attached file included as plaintext by Ecartis --

Bedava POP3 destekli E-mail Aldınız mı?...(http://www.celiknet.com)

-----------------------------------------------------------------------
Liste üyeliğiniz ile ilgili her türlü işlem için
http://liste.linux.org.tr adresindeki web arayüzünü kullanabilirsiniz.

Listeden çıkmak için: 'linux-request@linux.org.tr' adresine,
"Konu" kısmında "unsubscribe" yazan bir e-posta gönderiniz.
-----------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

---------

Bu arsiv hypermail 2b29 tarafindan uretilmistir.