Linux-ck and bash's history-search-backward

This issue seems really weird to me. I have this in my .inputrc:
$if mode=vi
set keymap vi-command
# these are for vi-command mode
"\ek": history-search-backward
"\ej": history-search-forward
"\e.": yank-last-arg
set keymap vi-insert
# these are for vi-insert mode
"\ek": history-search-backward
"\ej": history-search-forward
"\e.": yank-last-arg
$endif
This has been working for ages and still works when I boot the standard 3.0 kernel. But when I boot the 3.0-ck kernel, alt+j and alt+k do become previous-history and next-history respectively.
So, what does the ck-kernel has to do with these bash bindings?

I would like the up and down arrows to perform a search of the history for the string I have typed in the terminal. That is if I had issued the following sequence of commands in the terminal,
+$cd ~/+
+$nano .bash_profile+
+$vi .bash_profile+
so now these commands are sequentially listed in my bash history. Now if I press the up arrow, the first command to come up will be the last one that I entered, that is, +$vi .bash_profile+. Now if I had instead pressed +up+ three times, the command, +$cd ~/+ would come up. Now what I want bash to do, and had working in OS X 10.4, is if I type a string into the terminal (and DO NOT press ENTER) such as, +$cd+ , then I press +up+, bash will search through the terminal history for the instances of the command +cd+ that I have previously entered. This is the same behavior as the MATLAB command prompt.
I know this is possible because it used to work. I would like to have this behavior again because it is very useful. I do know that I can use +crl-R+ to search the history, but this is kind of a pain to use and it doesn't work very well.
Message was edited by: jetak

Similar Messages

  • 10.6 bash history-search-backwards

    This is a repost from http://discussions.apple.com/message.jspa?messageID=10954384
    10.6 broke my terminal history search
    In 10.4 I added
    bind '"M-[A": history-search-backward'
    bind '"M-[B": history-search-forward'
    to my .bash_profile allowing me to use the up/down arrows to search through the history in terminal, but as of 10.6 this no longer works.
    I would like the up and down arrows to perform a search of the history for the string I have typed in the terminal. That is if I had issued the following sequence of commands in the terminal,
    $cd ~/
    $nano .bash_profile
    $vi .bash_profile
    so now these commands are sequentially listed in my bash history. Now if I press the up arrow, the first command to come up will be the last one that I entered, that is, $vi .bash_profile. Now if I had instead pressed up three times, the command, $cd ~/ would come up. Now what I want bash to do, and had working in OS X 10.4, is if I type a string into the terminal (and DO NOT press ENTER) such as, $cd , then I press up, bash will search through the terminal history for the instances of the command cd that I have previously entered. This is the same behavior as the MATLAB command prompt.
    I know this is possible because it used to work. I would like to have this behavior again because it is very useful. I do know that I can use crl-R to search the history, but this is kind of a pain to use and it doesn't work very well.
    I added the above code to ~/.inputrc and now if I type the letter 'b' in terminal I get the output
    {quote}
    "": history-search-forward
    {quote}
    It only does this for the the letter 'b'. I have tried all the other keys and there is no weird output. What is up with bash?
    GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
    Also see threads:
    http://forums.macosxhints.com/showthread.php?p=569961#post569961 Mac OS X Hints 10.6 bash history-search-backwards
    http://www.macosxhints.com/article.php?story=20031026174236860 Mac OS X Hints 10.3: Assign arrow keys to history search in bash

    I have the following in my .bashrc file:
    # Setup Command line editing using vi mode (default is Emacs).
    # Map Ctrl-P and Up-arrow as command recall (previous),
    # with Ctrl-N and Down-arrow as next (foreword) command.
    # Viewing key binding:
    # bind -p | more # key bindings
    # bind -s | more # macros (like below)
    # bind -m vi-command -p | more # key bindings
    # bind -m vi-command -s | more # macros (like below)
    shopt -s -o vi # set vi command line editing.
    bind '"C-p": "ekA"' # Ctrl-P: when in insert mode
    bind -m vi-command '"C-p": "kA"' # Ctrl-P: when in insert mode
    bind '"C-n": "ejA"' # Ctrl-N: when in command mode
    bind -m vi-command '"C-n": "jA"' # Ctrl-N: when in command mode
    # I have had problems with a Linux version of Bash 2.05.8(1) that did not
    # like it when I remapped the up and down arrow keys, so if I find myself
    # with that version of bash, I do not try to remap them.
    # "cat -v" can be very useful for determing what the escape sequence being
    # issued by an keypad or function key. Keep in minde that the keypad has
    # multiple modes the terminal emulator can be placed in, which alters the
    # escape sequence, hence the multiple sets of mapping for up and down arrow
    # in both vi-insert and vi-command mode.
    if [[ "$BASH_VERSION" != 2.05.8(1) || $OSTYPE = darwin ]]; then #{
    bind '"M-OA": "ekA"' # Up-arrow: when in insert mode
    bind -m vi-command '"M-OA": "kA"' # Up-arrow: when in insert mode
    bind '"M-OB": "ejA"' # Down-arrow: when in command mode
    bind -m vi-command '"M-OB": "jA"' # Down-arrow: when in command mode
    bind '"M-[A": "ekA"' # Up-arrow: when in insert mode
    bind -m vi-command '"M-[A": "kA"' # Up-arrow: when in insert mode
    bind '"M-[B": "ejA"' # Down-arrow: when in command mode
    bind -m vi-command '"M-[B": "jA"' # Down-arrow: when in command mode
    fi #}
    The above does work for me on ALL my platforms (Mac OS X, Tiger, Leopard, Snow Leopard), Linux, Solaris, AIX, and Windows-Cygwin.
    I use vi command line editing, so if you prefer the emacs command line editing, then the above will not work for you, in some cases I map the up/down arrows and Control-P/Control-N to vi commands.

  • Terminal history-search-backwards

    Terminal's history-search-backwards appears broken in Leopard.
    The following in .bash_profile in Tiger allowed a quick search in Terminal's history (i.e. 'ls' and up arrow listed all ls commands in the history)
    bind '"\M-[A": history-search-backward'
    bind '"\M-[B": history-search-forward'
    In Leopard, it no longer works for me. Can anyone confirm?
    Tony

    changing \M- to \e fixed it:
    bind '"\e[A": history-search-backward'
    bind '"\e[B": history-search-forward'

  • Bash/shell history autocompletion!

    by adding this lines:
    bind '"\e[A":history-search-backward'
    bind '"\e[B":history-search-forward'
    in .bashrc (debian, ubuntu ..etc) can with ^ auto complete typed commands as user or root. but in archlinux just work for user mode not as root.
    maybe the arch have another .rc file not .bashrc!?
    best regards

    matzo wrote:
    Just create the file  '.inputrc' with the following content:
    "\e[A":history-search-backward
    "\e[B":history-search-forward
    Just as I remember it is necessary to also create a file '.bash_profile' with following content
    . $HOME/.bashrc
    Thus, the '.bashrc' should be interpreted for user root.
    .bash_profile is already created as default, srry, doesn't work as root too

  • Can't get conky-cli and bash scripts to both display in dwm statusbar!

    I'm trying to configure my dwm status bar to display some simple information using conky-cli and bash scripts. At first I tried just letting conky run the bash scripts (for network and volume state), but this increased my cpu usage by about 5%, which is significant considering I normally have 1-3% usage when idle. Also, I wanted to keep conky because it makes the display of certain information easy, such as cpu & RAM usage.
    The problem is I'm having trouble getting both to display side by side. Here are the relevant parts of my .xinitrc:
    network(){
    iwconfig wlan0 2>&1 | grep -q no\ wireless\ extensions\. && {
    echo wired
    exit 0
    essid=`iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}'`
    stngth=`iwconfig wlan0 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
    bars=`expr $stngth / 10`
    case $bars in
    0) bar='[-------]' ;;
    1) bar='[#------]' ;;
    2) bar='[##-----]' ;;
    3) bar='[###----]' ;;
    4) bar='[####---]' ;;
    5) bar='[#####--]' ;;
    6) bar='[######-]' ;;
    7) bar='[#######]' ;;
    *) bar='[--!!!--]' ;;
    esac
    echo $essid$bar
    exit 0
    volume(){
    vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
    echo Vol: $vol%
    exit 0
    conky | while true; read line; do xsetroot -name "`$line` `volume` `network` `date '+%a %m-%d-%Y %I:%M%p'`"; done &
    exec dwm
    (let me know if it would help to post any other files)
    For some reason when I run this I only get the network/volume scripts and date running, updating every second (I think). The conky line just doesn't show up. I don't know what could be wrong, since I didn't see any error messages.
    An even better solution would be to just have shell scripts to display CPU and MEM usage. I have a dual-core cpu, cpu0 and cpu1. I'd like to see both percentages if possible, or at least a percentage that is an accurate average of the two or something. In conky-cli I have something that shows:
    cpu0/1: xx% xx%
    Also, seeing RAM usage would help a lot. In conky it shows:
    mem: xx% (xxxMB)
    These are the ways I would like to have bash scripts show them, if possible, but I have zero skill in bash programming. I made this an option in case it's easier/cleaner/less resource hungry than a conky solution. Personally, if they're about the same in these aspects, I would prefer something with conky and the shell scripts because conky is so extensible, yet it's only flaw is executing scripts with minimal resource usage.
    Help?

    Thanks. I was thinking of using load average to save a few characters, but I didn't quite understand the numbers. I'll try that once I get to my Linux box, but could you please explain or post a link to something that explains load average (what's low, high, normal, etc.)?
    EDIT: I found a website that explains loadavg. I now have my dwm status bar displaying it perfectly (yay!). Now I just need to add a few more things like battery status, etc. and I might be done. I'll probably post here if I have more questions, though.
    Thanks for your help!
    Last edited by Allamgir (2009-07-18 14:41:11)

  • How to enhance Interaction History Search in CRM 2007?

    Hi experts,
    Is there any BADI available to enhance the existing Interaction History Search in IC Agent Profile?
    Thanks and Regards,
    Rohit

    Dear Rohit,
    Using the below steps you can quickly find out the BADIs related to any transaction.
    1) Put a breakpoint in the FM SXV_GET_CLIF_BY_NAME
    2) Run your transaction(e.g. Interaction History Search). It will stop at the breakpoint you have in the above FM.
    3) Chekc the value of the Fm parameter name. This will contain the BADI names.
    Alternatively you can get the BADI names the following way
    1)Go to the method GET_INSTANCE of the class CL_EXITHANDLER and put a break point there.
    2) Run your transaction(e.g. Interaction History Search). It will stop at the breakpoint you have in the above method.
    3) Chekc the value of the filed  exit_name. This will contain the BADI names.
    Hope this helps.
    Regards
    Anupam
    Edited by: Anupam Koley on Aug 11, 2008 11:55 AM
    Edited by: Anupam Koley on Aug 11, 2008 11:57 AM

  • Searching backwards in calendar

    It really amazes me that no one in the Apple iPAD/iPhone world seems to find wanting to search "backwards" in their calendar unimportant.
    Not many people seem to know that you cannot search for anything in the Calendar a year prior to the current date.
    I do this at least once a day on my PALM Calendar and it is such a useful tool for recalling events.

    This has been commented on before from time to time. Since it doesn't come up very often, maybe we can infer that it's important only to a relatively small proportion of users. But I can well understand that, to that group, it is very important. To me, it's an irritation, but I take it as one of the compromises inherent in mobile computing. What with 64GB iPads etc, many of those compromises should now be things of the past (256K Palm Pilot anyone?).
    If you haven't already done so, you can leave feedback at
    http://www.apple.com/feedback/ipad.html
    Apple doesn't reply directly to feedback posts, but does read and take note of them
    Message was edited by: nick101

  • Where can I find the LOG file for bash/command history typed into Terminal?

    Where can I find the LOG file for bash/command history typed into Terminal?
    For 2 weeks ago I was searching for a log file on my server. Somehow I opend a file where I could see a list of all bash-commands I had ever entered into OSX Terminal.
    Now I need this file.. but cant find it.
    What is the official location for this LOG file?
    Thank you so much for helping.

    cat .bash_history

  • 5.1 Preferences/Cookies and Private Browsing gone haywire - BACKWARDS

    There is something gone wrong, all haywire with the new version of Safari at 5.1.  The Cookies settings in the Prefs has "Block" settings, and I have it set at "ALWAYS" and yet it allows for me to sign in to any webpage with my name and password, whereas before I couldn't. At the same time, if I use "Private Browsing" and set that, it actually blocks my Cookies!!!! whereas before all it did was not remember History.   Somebody messed up the programming and got this one completely backwards, this should be the other way around.
    Cookies set to ALWAYS should block all cookies and Private Browsing should not block cookies just not remember history. 
    This is a major blunder. Needs immediate update fix, please. 

    1. There are other threads on this issue
    2. At least for me, the forums are not letting me 'reply' to posts, I am getting past this by going to 'advanced' and posting from there.

  • IOS5 and Google Web Page Search Is Tracking You???

    (...Sorry had to updated this post with non html imported text....)
    IOS5 and Google Web Page Search Is Tracking You
    Since upgrading to iOS5 I have found a new behavior with Google search web page that was not the same behavior in iOS4.  The Google search web page in iOS4 Safari would keep a history of your recent searches, even if you were not logged into a Google user account.  (I want to be clear that I am talking about the Google web page search, not the Safari/Google toolbar, nor any additional Google app installed on the iPhone!)  This search history was helpful on the iPhone as it allowed you to research or modify a search with less touch typing required.
    Previously in iOS4 you could go into the iPhone Settings>Safari and find options for clearing cache, history, cookies (and I believe website data/databases).  After doing a clear of all these options you could go back to the Google web page search and find that Google's web page and your browser had forgotten all you past search terms.
    I always understood that when searching with Google, their website always provided a cookie file that gets stored on you computer/iPhone and that Google used this cookie data file to help id you as a unique visitor to their search web page.  Based on this cookie file, Google was able to keep a history of your recent search terms and most suspected that Google could even tailor search results for you based on recent search terms and location information you had chosen to provide to the Google search web page.
    With iOS5, I am no longer able to clear my cache, history, website data, or auto fill forms options in the iOS Safari settings so that that all Google cookies or other data is removed from my Safari web browser.  No mater how I work through the Safari settings for clearing my browser data files, each and every time I go back to the Google web page search it still provides me a history list of all my past searches, even after clearing all cache, cookies, history, and website data settings.  Again this is only the Google web page based search, not the Safari search tool bar.  Again this occurs for Google search users that are not signed into a Google user account.
    After pounds of searching, the only way you can clear this Google web page search history is to follow the link/directions on a mobile device to a Google page with these instructions:
    “Clear search history on iPhone”
        For users not signed in to a Google Account
        Follow these steps to clear your search history:
            Tap Settings on google.com.
            Select Clear saved searches to remove your previous searches.
    Note: This will remove all of your previous searches done on the phone. If you don't want your searches to be saved, tap Settings, then under the Search History section select Do not save searches. Be sure to save your preferences."
    http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=163061
    This is what all of the world's web bloggers find and point you to when people want to know how to clear their Google search results.  What I am outraged about, is that everyone isOK with this and seams to think this is a good thing???
    If I have cleared all my web data from my Safari browser, how in the world is Google providing me with old search results every time I go back to the Google search web page? 
    Why is it that I have to go to a specially crafted Google webpage for mobile devices and then tell Google to stop tracking my search results? 
    How in the world is Google still tracking me after I have removed all cookies, web site data, and autofill settings from the Safari browser and while I am not logged into Google?
    What possible identifying information am I still providing to Google that uniquely identifies me and provides my own personalized search history?
    The only thing left that is possible is that Apple's iOS5 is providing some unique identifier, or that Apple has decided to omit clearing of Google's cookies from the Safari browser cache.  If you go to the mobile webpage link for Google web search settings and choose to clear you search history, Google honers this request.
    http://www.google.com/preferences?hl=en
    (note this is a different preferences page on the mobile version, not the same options as a desktop browser)
    Here at this preferences page you can also tell Google not to “Save” your searches.  If you are NOT logged into a Google user account, the search history is cleared, but then all saved settings are defaulted back to tracking/saving you search results if you are not logged into a Google user account.
    The problem with this is you always have some unique ID that is being sent to Google, without you consent.  Google promises that they will not track your search, but you have to go to Google web search settings and request that they get ride of data that they are already tracking about you.
    YES we should all know by now that Google is collecting information about what you are searching on with cookies that are stored on your computer.  Google has now a public habit of doing this for all users by default, even if they are not logged into a Google user account.  This is fine because up until now, you could always clear your web browser cache and your Google cookies would be wiped clean and to Google you would appear to be a new user.
    YES again I know that Google could use my IP address as a common unique identifier for me.  But these Google webpage search issues are also happening on a iPod touch that is only connected to Wifi, and the Google search terms are following me around from new hot spot to new hot spot, even after clearing the Safari web cache in between new Wifi locations.
    The only possible explanation is that the iPhone/iPod and Safari web browser is providing Google some unique identifier about me that is persistent, even after all Safari web browser cache data is  supposed to be cleared.
    How and why is the iPhone iOS5 providing a unique id about you to Google's web page search???

    andrewfromfreeport – I truly appreciate you looking at this and contributing.  My hope is that more people can take a look at this.
    But that “Clear History” link at the bottom of the Google web page search is exactly what I am worried about.  That is a server side link that you can use to ask Google to kindly stop tracking your search history.
    I am fine with Google using what ever tools they can to track my search.  That's what they do.  What I am having issue with is that Apple/Safari is enabling this with some unique identifier that allows Google to have a lasting connection with me, everywhere I go.  It used to be that web browsers were built to allow you to clear your history and provide some level of privacy.
    I find it very interesting that this persistent behavior with Safari and Google has just started after Safari was given a private browsing feature.  So now with a wink, and a nod, Apple will provide a unique ID about you, to Google and who knows who else, without your permission.  If you really have any need for privacy, you have to go enable the private browsing feature, and who says that works???
    Looks like I might need to go dig up the EULA for iOS5, as a bet there are new terms allow indexes or history of device usage for error reporting of other features....
    Last week I posted the same day iOS 5.01 was released, hopefully this post will hang at the top long enough for some more attention...

  • After search screen turns gray and can no longer search anything?

    After initial search screen on i pad goes gray and can no longer search anyhting. What did i do/

    Using Spotlight on the iPad or are you talking about Safari?
    If Spotlight, restart the iPad.
    If Safari...
    Go to Settings>Safari>Clear History, Cookies and Data. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Ticket History Search - CRM

    Hi,
    I have a customized CRM ticket history search which consists of 15 fields using webdynpro. Ticket history search is used to search the tickets which are created using crmd_order.
    Ticket history search module consists of both customized (like company name, Main-category and Sub-category and standard fields). I am facing the problem to give search functionality for all the 15 combinations which is 15! (factorial).
    I have used standard function module in the class CRM_SERVICE_PROCESSES_SEARCH. This function module dosnt include customized fields. So there is no link between customized and standard function module.
    Can anybody suggest me how to give search functionality for all possible fields.
    Thanks.

    hi,
    if you go in SE37 you can see that the function module CRM_SERVICE_PROCESSES_SEARCH is foreseen for extension. this is using the below one
    this function CRM_SERVICE_PORTAL_SEARCH might be better to use this one
    for the display
    the field REQUESTED_COLUMNS allows you to extend the display to other fields but not the search criteria
    You can add your own field there this is working fine , I have tested with my own developed fields (run SE37 in test mode and add your fields there)
    For the selection
    this is object oriented coding and I guess implementing your own method is the solution.
    best regards
    Xavier

  • I am transfering my stuff from my lap top to my desk top (both Mac). I cannot get my CS4 to open. It gives me a 150:30 error, licencing thing. I have no idea what to do and after hours of searching none of what I found helps. I don't know anything about t

    Sorry didn't know that the first step was just supposed to be "subject".
    So here it is again.
    "I am transfering my stuff from my lap top to my desk top (both Mac). I cannot get my CS4 to open. It gives me a 150:30 error, licencing thing. I have no idea what to do and after hours of searching none of what I found helps. I don't know anything about this stuff so please don't answer with "maybe this willl work, or maybe that."  I need a real answer please and I cannot find a way to actually contact Adobe. I also don't have a disk drive on this Mac. Thanks"
    Also please feel free to e-mail the answer because I hate looking for these answers online. It takes me forever to find this section. Not that I have even even gotten a real answer.
    [email protected]

    Hi Sonia,
    While transferring Adobe from laptop to PC the licensing files got corrupt and the right way to use Adobe Applications is to install first as transferring from a different machine can give you problems.
    You can try steps from this article if that helps otherwise you have to reinstall and manually delete some files , everything is mentioned.
    http://helpx.adobe.com/x-productkb/global/error-licensing-stopped-mac-os.html
    You can download CS4 from here:
    Download CS4 products

  • I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it

    I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it doesnt work

    Hi Timia,
    If you are using Safari as a web browser :-
    Open Safari, go to Safari menu > Preferences > General, and put Google as the homepage. Then, choose Google as your default search engine.
    If you are using Google Chrome as the web browser :-
      Open Google Chrome.
      In the top right corner of the page, click the Chrome menu Chrome menu > Settings.
      In the "Search" section, select Google from the drop-down menu.
    Let me know if you still experience any issue.
    Regards,
    Aadesh

  • How do I get rid of the history search section on the left of my screen?

    All of a sudden there is a section on the left side of my Firefox online screen that has:
    Search: [?] [View ]
    + Yesterday
    + Last 7 days
    I don't know how it got there, I've tried disabling plug-ins, personalizing tool bar, etc., and can't get rid of it. If I place my cursor on the line that separates this section from the regular Firefox screen, an arrow appears as if I could drag the right part of the screen to the left and "cover up" this search section, but the drag won't work.

    Thank you, thank you, thank you! Sorry for being so dense.

Maybe you are looking for