Results 1 to 6 of 6

Thread: Xterm, Eterm and aterm tips

Hybrid View

  1. #1

    Xterm, Eterm and aterm tips

    Hmm, I read this sweet little trick on a forum somewhere. I'll find out where it was and give credit where credit is due.

    Anyways, here's a nice enhancement for your Xterm-based terminal:

    Oddly enough, few people has heard about the command called shopt. Shop can be used to set/unset options specific for you terminal. For instance, typing 'shopt -s' in the terminal produces a list of options turned on. In my case, this is:

    $ shopt -s
    checkwinsize on
    cmdhist on
    expand_aliases on
    hostcomplete on
    interactive_comments on
    progcomp on
    promptvars on
    sourcepath on

    shopt -u shows a list of options that are not currently on.

    Now, if you try shopt -s checkwinsize, you'll get that annoying wordwrapping fixed.

    Trying shopt -s cdspell enables a cool little 'spellchecker'. Example:

    $ shopt -s cdspell
    $ cd /sur/scr
    /usr/src

    Sweet, no?

    Hope this helps anyone. shopt is pretty nice, even though it's just a minor thing. Try placing these commands in /etc/profile to have them enabled at all times.

  2. #2
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    wow that is useful, thanks!

  3. #3
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Wow, I didn't even know that was there. Thanks post. The spell check is sweet.
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  4. #4
    Associate
    Join Date
    Jun 2004
    Location
    The Matrix
    Posts
    34

    Re: Xterm, Eterm and aterm tips

    Very cool. I'm going to put that in the tips 'n tricks section on my site
    I prefer the way tcsh does the spell-checking though (it prompts whether you want the change, do not want the change, want to edit the command or totally abort - dunno exactly how this is configured, in the gentoo default configuration).
    Thanks a lot
    Sam

  5. #5
    Hah, nice to see that people likes it.

    I'll post more small stuff like that as soon as I find more.

    I love checking out those hidden things.

  6. #6

    Re: Xterm, Eterm and aterm tips

    Most of the people is also not aware that there is such a thing as
    Code:
    #   bash_completion - some programmable completion functions for bash
    which can be found under debian in /etc/bash_completion (I'm not sure if other distros ship it with bash as well but it is available online)

    And this thing is not enabled by default:

    Code:
    *ravana[0] ~>grep complet /etc/bash.bashrc
    # enable bash completion in interactive shells
    #if [ "$PS1" -a -f /etc/bash_completion ]; then
    #    . /etc/bash_completion
    But if you enable it you get smart bash complition. So whenever you type
    acroread fn and press tab, it will complete not to all files in the directory but rather to the files with extension pdf! The same idea goes behind many other known tools (mplayer etc). But what is more fun: under debian do

    apt-get install moz

    and press tab -- you will get completions for the names of the available packages named by moz<somthing>

    So use and enjoy :-)

    o - and if you need non-standart name of the file with a "wrong" extension, just use Alt-/ :-)

Similar Threads

  1. Transparent xterm??
    By in forum General Chat
    Replies: 4
    Last Post: 05-26-2004, 02:23 AM
  2. eterm/aterm problem
    By mojo jojo in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 03-23-2004, 03:20 AM
  3. Eterm and RedHat 7.3
    By LiNuts in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 07-31-2002, 01:22 AM
  4. eterm
    By cameron in forum Linux - General Topics
    Replies: 1
    Last Post: 04-05-2002, 12:55 AM
  5. Re: Problems with Xterm
    By Killer_Penguin in forum Linux - Software, Applications & Programming
    Replies: 9
    Last Post: 02-11-2002, 04:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •