Announcement

Collapse
No announcement yet.

xterm and history

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    xterm and history

    Dear friends,

    I used to use xterm in opensuse and by default the shift key + cursor key(up, down) functioned to go through history list e.i., writing vi and then pressing shift+up I could go through all old commands in history starting with vi? Recently I installed kubuntu and this feature does not function? I am so much thankful ti whom can give me a help what to do?

    Actually on the web I found that these two files
    /usr/lib/X11/app-defaults/XTerm
    /usr/lib/X11/app-defaults/XTerm-color

    contains the setting of xterm. So I copied these two files from a opensuse installed machine to my ubuntu installed machine but it did not work too.

    thanks alot,
    Reza.



    0
    xterm
    0%
    0
    history
    0%
    0

    #2
    Re: xterm and history

    Actually it is bash that allows you to search your history of commands (unless you changed to a different shell). The file that sets the key-bindings for the CLI in kubuntu is /etc/inputrc. It looks like you can remove the '#' from the the second and third lines of:
    Code:
    # alternate mappings for "page up" and "page down" to search the history
    # "\e[5~": history-search-backward
    # "\e[6~": history-search-forward
    to bind the search function you want to pgup/pgdown.

    You should be able to find the key code for shift-up and shift-down to change it to that, but I believe that is bound to scroll up/down by default.

    Comment


      #3
      Re: xterm and history

      Dear friend,

      Thank you. I did what you had written but it did not function. However something in your solution helped me to the solution. I compare /etc/inputrc of my ubuntu to the opensuse and I found some related settings for the xterm in the opensuse one and then I copied them to the ubuntu. Now the problem is solved. Thanks for the name of the file /etc/inputrc you wrote me.

      How can I find this type of informations such as "/etc/inputrc is reponsible for the key bindings"?

      best,
      Reza.

      Comment


        #4
        Re: xterm and history

        Yay, I'm glad you got it working to your liking.

        There are many ways to find the information you are looking for.
        Some good search terms are: "bash history search auto completion". Or, you can hunt down the appropriate file by searching for the program in /etc (where setup files are stored) or the hidden files/folders in your home dir (your personel settings are saved there). You can also 'grep' for key words in /etc/ and your /home directory.

        Code:
        grep -R history /etc
        That will search recursively for all plain text document in /etc containing the word history.
        Code:
        man grep
        for more information.

        Comment

        Working...
        X