Wednesday, January 12, 2011

Unable to use stty in Mac's Zsh

Unix Power Tools -book recommends to use the following command if you do not want to get any notification of running process

stty -topstop

or

stty -topstop

Both commands give me

stty: illegal option -- topstop
usage: stty [-a|-e|-g] [-f file] [options]

How can you use the command in OS/X's Zsh?

  • This does not seem to be a zsh issue. This is an issue with the specific implementation of the command stty on your system.

    To investigate a new command, remember:

     $ man [command]

    There are also manual pages online, so if your particular system does not have the man pages installed, you can still get the needed info.

    Many modern utilities have built-in help info. Try

    $ [command] -h 

    or

    $ [command] --help

    to figure out what options the [command] you're interested in has on your system.

    I am also suspecting that you have a typo. Do you really mean "topstop"? This does not seem to be a valid option.

    From EricJLN
  • stty doesn't seem to have a -topstop option; is it supposed to be -tostop? Use

    man stty
    

    for details on the stty command and its options.

  • Before running the command, you must tell zsh to unlock your terminal:

    ttyctl -u
    stty -tostop
    
    Masi : I get the same error message. -- I need to try your code in Ubuntu. It will likely work.
    From redondos

0 comments:

Post a Comment