[SOLVED]How to make a multiline PS1 wrap properly

Hello,
Im am having a problem with my PS1 wrapping improperly when a command is loger than one line.
Here is my PS1:
PS1='$(tput bold)\e[0;34m┌─[\e[m$(tput sgr0)\@$(tput bold)\e[0;34m]─[\e[m$(tput sgr0)\u$(tput bold)\e[0;34m]─[\e[m\W\e[0;34m]\n└─[\e[m$(tput sgr0)\$$(tput bold)\e[0;34m]─>\e[m$(tput sgr0) '
Here's what happens:
┌─[07:00 PM]─[eric]─[~]
ng_line pacman -S a_really_really_really_really_lo
Here's what it should look like:
┌─[07:00 PM]─[eric]─[~]
└─[$]─> pacman -S a_really_really_really_really_long_line
anyone who knows how to fix this please help.
Last edited by TheCash (2010-07-19 14:03:05)

I'm glad you got it working! Please prepend "[Solved]" to the thread title by editing the first post.
The third time you try to use $white, you have w$hite typed instead Also, if it's easier for you, you can put the \[ and \] in the variable, if I recall correctly.
Last edited by jac (2010-07-19 14:00:32)

Similar Messages

  • Almost finished!!  How to make JButton Text word wrap??

    Is this possible? If so, how or, where do I go to get the answer. After reviewing the JButton class (which I really don't always understand the leap between the API documentation and the actual code that is derived from it) and its constructors, methods and inherited everything, I cannot seem to find a way to make my text wrap in a JButton.
    It just disappears to the right, but nicely centered.
    Much appreciation.

    This is why you don't post the same question multiple times....
    I answered your question in your other thread, and was all ready to ignore this thread when I saw the dukes.
    Answer is here:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=372505&tstart=0&trange=15
    Cheers,
    Radish21

  • [SOLVED] How to make file read only and stay?

    I'm using gnome 3 and want to make the recently used.xbel file (in .local/share) read-only/locked. I've tried making it read only and it just reverts to normal when something tries to write to it. How do I do this?
    Last edited by sudokill (2011-04-29 19:41:51)

    Worked great, thanks. No more recent documents at all

  • How to make a text field wrap to next page

    I've done my best to find the solution to my problem before coming here to post, so forgive me if I've missed a previously posted solution.
    I am a .NET coder, using iText to manipulate PDF's.  I need to create a template for a corporate invoice that will allow me to have header and footer content on a page, surrounding the invoice detail section and have the invoice detail wrap to the next page as necessary.
    Criteria:  All pages have the invoice header.  All pages have the invoice footer with pagination (i.e. Page 1 of n).  The number of pages is controlled by the number fo lines in the invoice detail text field.
    For example, if the text field holds 30 lines and each line item takes up a single line.  An invoice with 25 line items would only use one page.  If the invoice has 35 line items, the content in the text area needs to flow to page 2 in the invoice detail area.
    I have tried every combination I can dream up in Adobe LiveCycle Designer and I cannot get a document set up that will flow from page 1 to page 2.
    For me to be able to access invoice detail field in code, it appears that it needs need to be a Text Field.  I've been able to access the fields from my .NET code and fill them in without issue.
    What I cannot get is a template that will allow me to put more content in the detail area than fits on page one and have it automatically create a second page and flow the content into the detail area.
    Can anyone point me in the right direction, or provide a working sample PDF?
    I.e.
    PAGE 1:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #1
    Lilne item #1 detail
    Line item #2
    Line item #2 detail <from here, detail must flow to the detail section of the next page>
    Page 1 of 2
    PAGE 2:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #3
    Lilne item #3 detail
    Line item #4
    Line item #4 detail
    Page 2 of 2

    While I appreciate the direction to the samples, that is not resolving my issue.  I had already seen the samples before I posted in this forum.
    None of the samples have what I've requested assistance with above.
    I need a static 3" header, a 5" content area and a 1" footer on every page in a document.  I want to be able to put content in the content area and have it wrap to subsequent pages if the content is more than will fit in the area.  Each subsequent page must also have the 3" header, 5" content area and 1" footer.
    This will not be edited in Acrobat, it will be edited in .NET code without human intervention, so having click buttons to add another row to a table is not an option.
    I could create the entire PDF programmatically, but I'm seeking to find if Adobe LiveCycle Designer can make the PDF form in an easy to use GUI.
    If the details of my need above do not provide a clear requirement, feel free to point that out.

  • [SOLVED] How to make URxvt look like default XTerm?

    I don't want to install terminus-font or something else. Just want to make XTerm and URxvt look equal.
    I prefer URxvt over XTerm for its performance, but default URxvt looks ugly comparing to default XTerm: for example default bitmap font (fixed) is broken whereas it looks beatiful on XTerm.
    Also colors in URxvt do not match to those in console and XTerm (which seem to be the same) - highlighted directories, executables, prompt, etc which seem to be darker.
    How do I fix it?
    Help is appreciated, as always.
    Thanks.
    Last edited by eruditorum (2012-12-07 09:35:23)

    I believe the default xterm fonts are listed in /usr/share/X11/app-defaults/XTerm.  I may be wrong but I think you want to specify the urxvt font as:
    -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
    This will be incorrect if you do not have the xorg-fonts-75dpi package installed.  If you don't have that package installed, I'm not sure what font is used in its place by either emulator.
    WIthout specifying the terminal colors in my ~/.Xdefaults or ~/.Xresources file, I also found the two terminals' colors do not appear the same.  I have configured the colors so they are identical in both apps.  This excerpt from my .Xdefaults uses the asterisk, *, as a wild card so the colors I have chosen apply to both terminals.
    ! Colors
    *foreground: rgb:b2/b2/b2
    *background: rgb:08/08/08
    ! 0 black, 1 red, 2 green, 3 yellow, 4 blue, 5 magenta, 6 cyan, 7 white
    ! 8 black, 9 red, 10 green, 11 yellow, 12 blue, 13 magenta, 14 cyan, 15 white
    *color0: rgb:28/28/28
    *color1: rgb:ba/44/44
    *color2: rgb:50/94/43
    *color3: rgb:cd/a8/38
    *color4: rgb:52/76/a8
    *color5: rgb:c0/52/88
    *color6: rgb:44/ba/ae
    *color7: rgb:b2/b2/b2
    *color8: rgb:58/58/58
    *color9: rgb:ff/9d/80
    *color10: rgb:84/bd/79
    *color11: rgb:ff/e6/98
    *color12: rgb:82/a4/d3
    *color13: rgb:c6/84/a5
    *color14: rgb:a7/d8/d4
    *color15: rgb:e4/e4/e4

  • How to make StaticText multiline??

    Hi All,
    I am trying to build an wizard where I have a long description and want to dispaly that using one StaticText in multiple Lines. It seems to be possible but I don't know how to achieve multiline feature in sap b1 StaticText.
    In the document generation wizard there is a static text with multiline in it.
    I have tried to increase the height of level programmatically didn't work.
    Regards
    Bikram

    Hi Bikram,
    I don't know the settings too..
    Try doing it programmatically, by adding new line after a certain character length reached. in Vb.net I used vbcrlf
    lets say I have "this is a sample static text" see codes below.
            Dim strText As String = "this is a sample static text"
            Dim finalText As String = ""
            Dim maxLen As Integer = 20
            Dim cntLen As Integer = 0
            For s = 1 To Len(strText)
                finalText = finalText & Mid(strText, s, 1)
                If cntLen >= maxLen Then
                    If Mid(strText, s, 1) = " " Then
                        cntLen = 0
                        finalText = finalText & vbCrLf
                    End If
                End If
                cntLen = cntLen + 1
            Next
            Label1.Text = finalText
    Good luck

  • UCCE 7.5: How to make automatic filling of wrap up codes in CAD

    Hello, All!
    In some situations we need to automatically filling of wrap up codes.
    For example - agent is in the Outbound mode, customer not home, agent push "Customer not home" button, and after call must fill wrap up code "Customer not home". We want in this case to automatically filling wrap up code.
    Is It possible?
    May by - with creation custom button that will set outbound call result and fill wrap up at the same time..
    Thank you!

    Hello,
    Wrapu-up is a reporting method, not telephony or UCCE method , what you can do in the outbound case is to do the call back but i had never saw a wrap-up to be used as a filling .
    i think your best option is (if you really need this) is to go to a third party CRM agent software that is capable of doing such thing.
    Amer

  • [SOLVED] How to make small MS fonts antialiased?

    I have the ttf-vista-fonts package installed because I like fonts like Calibri. However, at font sizes under 15 pt, that font (and one or two others in the set) gets rendered without antialiasing on, which really grates on the eyes considering that the other fonts on my system are antialiased at that size. To make matters horrendously worse, anytime a ligature occurs in the text ("tt", "fi", etc.), those letter pairs are antialiased! I copied the calibri TTF files over from a Windows installation and they are indeed the same files as on Windows, where it antialiases all the way down to 8 pt and possibly lower. From this I know it's something in my configuration.
    What in my configuration is making this happen and what do I have to change to make this font antialias all the way down? Something in my fonts.conf maybe?
    Last edited by jgott (2011-06-17 22:25:03)

    thayer wrote:
    Calibri has embedded bitmaps; this drove me nuts too. The easiest thing to do, depending on your current DE/WM, is to add the following lines to your ~/.fonts.conf
    <!-- disable embedded bitmaps in fonts to fix Calibri, Cambria, etc. -->
    <match target="font">
    <edit mode="assign" name="embeddedbitmap"><bool>false</bool></edit>
    </match>
    Check out my fonts.conf for more info. Websites like http://codinghorror.com used to look horrible before this fix.
    Thank you, this quick little snippet totally did the trick. And actually, Coding Horror was one of the places where I was constantly bugged by this in the recent past.

  • [SOLVED] How to make sense of the Forms Client SOD Matrix ?

    Hi,
    We have installed 10.1.2.3 app server and are using Jinitiator version 1.3.1.28 on Windows under IE 7.
    Before we did this I read the matrix, saw that IE 7 was certified with 10.1.2.2 and Jinit 1.3.1.28.
    I also noted the line stating "When a client platform is certified with a specific patch release it is implicitly certified with all subsequent patch releases.".
    I (and I presume thousands of others) read this to mean that because it works fine with 10.1.2.2., if we patch to 10.1.2.3 then it will be implicitly certified.
    Not so according to Oracle Support ! X-( They tell me I am running an uncertified combination and must use the Sun plug-in (which we have found issues with). Can anyone from Oracle confirm that the combination i am using is OK please ?
    i have replied to my TAR with support pointing out this line I have quoted above and also asking why when you patch to 10.1.2.3 and run a test form does it run Jinitiator 1.2.1.26 if it is not supposed to be supported ....
    Ho hum ....:(
    ** Yes it is supported. I was going insane ....
    Edited by: Dom on Jan 29, 2009 1:17 PM

    donniezazen wrote:https://bugs.archlinux.org/task/29850#comment95791The thread that I started.
    Thank you. It wasn't quite what I was looking for, but may solve why I've set up such monitoring in the first place. Installing linux-ice now to test.
    @Pres
    Thank you so much. That helps clear some things up, and means I can remove the load averages from my monitoring (they aren't measuring what I want to measure).
    I still need to figure out the disparity between per process CPU usage and overall CPU usage, but those two were closer together anyway, so less of a worry.
    I'm going to mark this thread solved.

  • [SOLVED] How to make settings in LXTerminal permanent?

    This is what I'm trying to do with the LXTerminal: Change the text color, make the window 100% transparent (including frames) and make the window pop up in my upper left corner at startup.
    This is what I can do, and what I need help with:
    - I can make the LXTerminal launch at startup editing /etc/xdg/lxsession/LXDE/autostart, but not where I want it (only default).
    - I can change the text color, and make the window transparent (including frames with the help of obconf), but after reboot the transparency is gone, and I get this black header on my window that I have to remove by a right click option. All settings is set manually in the LXTerminal GUI, not by command line.
    I've been searching the internet for solutions, but non of them seems to work for me. Everything I came across referred to Openbox files that doesn't exist in my setup. I'm fairly new to Arch, so please bare with my ignorance. Relevant software I run: Xorg, LXDM and LXDE.
    Last edited by madr (2013-04-29 20:41:11)

    Openbox is part of the LXDE group - so if you installed the whole group (as is the default action) you should have it already
    :: There are 20 members in group lxde:
    :: Repository community
    1) gpicview 2) libfm 3) lxappearance 4) lxappearance-obconf
    5) lxde-common 6) lxde-icon-theme 7) lxdm 8) lxinput 9) lxlauncher
    10) lxmenu-data 11) lxmusic 12) lxpanel 13) lxrandr 14) lxsession
    15) lxshortcut 16) lxtask 17) lxterminal 18) menu-cache 19) openbox
    20) pcmanfm
    Enter a selection (default=all):
    ... and is the default LXDE windows manager - although you can use any other if you so like
    https://wiki.archlinux.org/index.php/LXDE
    https://wiki.archlinux.org/index.php/Openbox
    You may be able to do what you want with a keybinding in:
    ~/.config/openbox/lxde-rc.xml
    or a custom .desktop file in ~/.config/autostart
    Last edited by satanselbow (2013-04-29 14:03:40)

  • [SOLVED] How to make "yaourt" run with "AUR" command?

    I want to change the yaourt command so i can use something like aur or AUR.
    for example, instead of
    yaourt -S package-name-here
    I want to use
    AUR -S package-name-here
    so that it's easier to type.  "yaourt" is such an odd string to type! hehe
    I think i might use something like this:
    function AUR {
      **something like: exec /.../yaourt**
      **and some other code to pass on -S or -U conditions...etc**
    Can someone tell me what to put in this function and where to save it to?
    Also, What's better: using the yaourt call above or the following custom function (instead of yaourt):
    function AUR {
            cd $aurdir
            wget http://aur.archlinux.org/packages/$1/$1.tar.gz && tar -xzf $1.tar.gz && rm $1.tar.gz && cd $1 && makepkg -s
            pacman -U **some code goes here to output the correct filename**
    I have to think to myself "yeah our t" to type yaourt (haha) so to think "AUR" is much simpler, since that's what we're getting packages from anyways.
    Last edited by trusktr (2010-02-21 22:14:20)

    When and if one uninstalls yaourt, still gonna leave the aliases in the .bashrc... that's untidy too... Wich is more simple, "ln -s /usr/bin/yaourt /usr/bin/AUR <enter>" or "nano ~/.bashrc <enter> alias AUR='yaourt' <ctrl+x> <y> <enter>" ... It's better to use aliases in .bashrc because you can do so much more and get to learn alil bit more for future reference, but the reasons for not symlinking it's really not that bad. If you've ever used windows for example, symlink works almost the same as creating a shortcut to an application on the desktop, once unistalled the application, you manually have to delete the shortcut. Aliases is the proper way to go, i didn't know this at all.. I just symlinked to yaort but after reading this i switched to alias Btw mark topic as solved ^^

  • [SOLVED]How to make udisksctl unmount without prompting for a password

    A while ago I pretty much started using commandline for just about everything with file management, to the point where I don't have a file manager installed.  The only problem I've had is that I got tired of manually mounting USBs and I read that fstab was not the proper way to do it.  So I looked into udisks and installed it.  It works wonderfully, except every time I want to unmount a USB I have to type in my password.  I find this rather irritating seeing as I have a button on my keyboard for just that, but it won't work since I can't bind it and enter my password.  Is there any way I can make udisks not require a password?
    Edit: Because it seems unclear, at this current point, when I plug in a USB it mounts to my /mnt folder.  When I try this command:
    udisksctl unmount -b /dev/sdc1
    It asks for a password.  I just need to make it go automatically.
    Also, I meant fstab when I typed cfdisk.  My mistake.
    Last edited by Dornith (2014-05-13 16:10:47)

    berbae wrote:Does the option '--no-user-interaction' prevent the authentication dialog from appearing in your case?
    I tried that and got this error:
    Error unmounting /dev/sdc1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operation
    berbae wrote:Do you mount external or internal block device file systems?
    External.  This is all for USB flash memory drives.

  • [SOLVED] How to make the volume knob on my headset work

    I have a Turtle Beach PX3.  It's a USB wireless headset.  I got the sound working and everything and I can control the volume through the XFCE mixer or the ALSA mixer but I would like to be able to use the physical knob.  On Windows 7, it just sends a signal to bump up the volume in the software mixer much like the volume controls on a keyboard would.  For the short time I used Xubuntu 12.04 it recognized that I was moving the knob (it popped up a volume bar) but it seemed to be adjusting the wrong thing because the volume didn't actually change.  On Arch, it doesn't do anything.  I'm just did a fresh install and I'm running XFCE with just straight ALSA but I wouldn't be objecting to trying out PulseAudio or something if it would help (though I've never set this up in Arch so I may need a little help).
    Last edited by weirddan455 (2012-10-09 20:07:10)

    Nevermind, got my Google-fu on and the package was xorg-xev.  It recognized when I moved the knob.
    Here's the volume raise code:
    KeyPress event, serial 38, synthetic NO, window 0x1600001,
    root 0xc6, subw 0x0, time 8056414, (56,97), root:(540,575),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    And the volume lower:
    KeyRelease event, serial 38, synthetic NO, window 0x1600001,
    root 0xc6, subw 0x0, time 8054284, (56,97), root:(540,575),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    Last edited by weirddan455 (2012-10-09 13:45:12)

  • [SOLVED] How to make pendrive be available to mount by nonroot user?

    Hello,
    So I'm 2 days old arch linux user. I've managed to install everything I wanted so fat without much problem (basic tools, xmonad), so far I like it. It's fun.
    Since arch doesn't automatically mounts pendrives like I'm used to in Ubuntu so I decided to be able to mount as normal user and added:
    /dev/sdb /media/pendrive vfat defaults,user 0 1
    Everything worked fine until I installed dosfstools (so as to have mkfs.vfat). After that my system wouldn't start without pendrive in USB slot. (Probably because dosfsck couldn't check it). So I tried changing that fstab line to:
    /dev/sdb /media/pendrive vfat rw,suid,dev,exec,noauto,user,async 0 1
    (Same as defaults but with noauto instead auto).
    It didn't work. So I have commented the fail entry. Is there any solution to my problem (mounting as non-root user)?
    Last edited by gregorias (2011-09-09 17:56:58)

    This is what I have in my fstab:
    $ grep TOMLAD /etc/fstab
    /dev/disk/by-label/TOMLAD /media/TOMLAD auto rw,user,noauto,async 0 0
    The mount point has the following permissions:
    $ ls -l /media/ | grep TOMLAD
    drwxrwx--- 2 root storage 4.0K May 25 19:56 TOMLAD/
    That is, it is owned by root, but anyone in the group 'storage' has rwx access. Any user in the storage group can now just type:
    $ mount /media/TOMLAD
    Simple. I actually have a whole bunch of mount points so I can mount any external disks whenever.
    Auto means that it will auto mount the device during boot. If the OS doesn't find it then it won't boot because there must be a problem. Remember, this was invented for servers were the storage doesn't just disappear.
    Also, it's a good idea to give your pendrive a name so that you can refer to it by name instead of /dev/sdb since this changes as you plug in more devices.
    Last edited by BaconPie (2011-09-08 17:49:22)

  • [Solved] How to make Jabber chat apps work on Noki...

    I had a problem with any third-party chat apps not being able to connect to the network.
    Nokia Asha 210 Dual Sim - Chat apps fail to connect
    My Nokia 210 works well both with GPRS and WiFi. The internet browser works ok, as well as Nokia Chat.
    However, the third-party XMPP chat applications fail to connect to the server (this is true for GPRS and WiFi ):
    - Nimbuzz (installed directly from Ovi Store):
    "nimbuzz needs your permission to connect to the internet"
    - Talkonaut (downloaded from the official site, run from the SD card, http://www.talkonaut.ru/download.shtml )
    Simply tries to reconnect all the time, never manages to connect.
    - Bombus (downloaded from the official site, run from the SD card, http://bombus-im.org/wiki/bombus/help_english)
    Shows some Java exception, but obviously seems being unable to connect after trying for a few seconds.
    I have checked:
    - my Access Point settings which seems to be ok (the internet browser works ok);
    - access rights for the chat apps (all of them are allowed to access the data connection).
    SOLUTION:
    1. I followed the advice here: http://discussions.nokia.com/t5/Asha-and-other-Nok​ia-Series-30/check-your-connection/m-p/2380795#M10​...
    2. Menu > Sim mgr > Sim 1 > Mobile data (set checkmark ON)

    I had a problem with any third-party chat apps not being able to connect to the network.
    Nokia Asha 210 Dual Sim - Chat apps fail to connect
    My Nokia 210 works well both with GPRS and WiFi. The internet browser works ok, as well as Nokia Chat.
    However, the third-party XMPP chat applications fail to connect to the server (this is true for GPRS and WiFi ):
    - Nimbuzz (installed directly from Ovi Store):
    "nimbuzz needs your permission to connect to the internet"
    - Talkonaut (downloaded from the official site, run from the SD card, http://www.talkonaut.ru/download.shtml )
    Simply tries to reconnect all the time, never manages to connect.
    - Bombus (downloaded from the official site, run from the SD card, http://bombus-im.org/wiki/bombus/help_english)
    Shows some Java exception, but obviously seems being unable to connect after trying for a few seconds.
    I have checked:
    - my Access Point settings which seems to be ok (the internet browser works ok);
    - access rights for the chat apps (all of them are allowed to access the data connection).
    SOLUTION:
    1. I followed the advice here: http://discussions.nokia.com/t5/Asha-and-other-Nok​ia-Series-30/check-your-connection/m-p/2380795#M10​...
    2. Menu > Sim mgr > Sim 1 > Mobile data (set checkmark ON)

Maybe you are looking for

  • Show result before I click "Find" button~

    HI ALL~ I have a problem~ ex: A-Group has "Find Page=true"...... when I navigate FindA-Group.jsp , there has result in the page before I press "FIND" button.(I combine fine page and result page to same page).Of course,I can input some data in query c

  • More details on inventory cube

    Please search help.sap.com for the same Hello Also please let me know the all standered multicube or basic cubes name for    Purchase Orders for analysis of purchase orders, open purchase orders (5 standard cubes) Regards Edited by: Arun Varadarajan

  • Malfunction of Detail Sharpening in ACR

    I'm using two Mac computers, both with PS CS5 12.0.4, ACR 6.6.0, and OS x10.6.8. On one computer, PS and ACR work fine.  On the other, I have the following problem: When I apply Sharpening in the ACR Detail panel, setting all the sliders, then open t

  • ROM, Chip, and OS screen at boot

    Startled this AM when I pushed the power button to see read only memory, chip, bios, and OS data on a screen instead of the normal start up sequence. Instructions on the screen said use the volume level switch to move between commands. Options includ

  • How to create anti-spoof rules with exception

    Hello all, I'm a beginner with Ironport and I need to create rules for specific cases. I manage many mail domains and I want to create an anti-spoof rule with message filter. Easy to do with a dictionnary containing all my mail domains. But I have so