Giter Club home page Giter Club logo

bash-sensible's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bash-sensible's Issues

more readline/ inputrc options

I tend to use a separate .inputrc file but you can of course put these in bind commands like you're already doing from the bashrc... Here are two of my favorites:

# From http://www.ukuug.org/events/linux2003/papers/bash_tips/
# Incremental searching with Up and Down
"\e[A": history-search-backward
"\e[B": history-search-forward

e.g. so typing ssh <up arrow> searches through prior ssh commands rather than your entire command history.

Place binds in a tty detection block?

When I scp to a host that I've added the sensible.bash to my ~/.bashrc, I see bind warnings.

/home/matt/bin/sensible.bash: line 28: bind: warning: line editing not enabled

I placed the binds in a TTY detection block like explained here: https://superuser.com/questions/892658/remote-ssh-commands-bash-bind-warning-line-editing-not-enabled

if [ -t 1 ]
then
  # standard output is a tty
  # do interactive initialization

  # Enable history expansion with space
  # E.g. typing !!<space> will replace the !! with your last command
  bind Space:magic-space
  ...
fi

Works well for this.

Suggested resource

I wanted to point out to you and perhaps anyone else to mathiasbynes dotfiles. Its a great community maintained set of configs. It has a much larger scope than your project, however it may be a great resource for you to draw on a "sensible" set of options. Or just a place to point people to when their suggestions fall outside "sensible" defaults.

In particular:

Some additions

I'll try to contribute in free-form style:

  • set -o noclobber
  • shopt -s checkwinsize
  • stty -ixon
  • PROMPT_DIRTRIM=2
  • . /usr/lib/git-core/git-sh-prompt
  • show the last command exit status message: PROMPT_COMMAND='_status=$?; [[ $_status == 0 ]] || echo -e "\e[4mExit status: $_status\e[m"; '$PROMPT_COMMAND

Disabling terminal freezes because of scroll lock (XOFF)

What about disabling scroll lock (XOFF), to avoid people puzzling why the screen is frozen, having to find out about Ctrl-S and scroll lock and hitting Ctrl-Q to "unfreeze"?

I've been using this for years in my bashrc, but I don't know how portable it is:

# disable terminal locking
bind -r '\C-s'
stty -ixon

Timestamp format is not ISO8601

"%F %T" looks like a decent timestamp format to me, but it's not an ISO8601 timestamp, that would be "%FT%T". Suggest you remove the reference to the standard there.

Why is HISTIGNORE exported?

Just wondering why HISTIGNORE is exported while none of the other variables are.

My inclination is to say HISTIGNORE should not be exported since it seems bash specific and subprocesses won't use it.

Up-to-date Bash on OS X

What is the recommended version of bash-completion?

  • Mac OS X 10.11.3
  • bash 4.3.42(1)-release (via brew install bash)

With bash-completion 1.3 (brew install bash-completion), I'm getting the following error:

-bash: shopt: dirspell: invalid shell option name

With bash-completion 2.1 (brew install bash-completion2), I'm getting the following errors:

-bash: shopt: dirspell: invalid shell option name
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: complete: -D: invalid option
complete: usage: complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...]

Suggest Bash upgrade for OSX users.

You might want to update your readme.md to suggest that OSX users upgrade to bash 4.x

This worked for me (obviously need homebrew installed first).
brew install bash;echo /usr/local/bin/bash|sudo tee -a /etc/shells;chsh -s /usr/local/bin/bash

Split project into "bash-sensible" and "inputrc-sensible"

I love the idea of this project and appreciate the great defaults it gives me. Thank you.

To make the project even better I propose to split the defaults into "bash-sensible and "inputrc-sensible" for two reasons:

  1. Avoid shadowing preferences set in ~/.inputrc (e.g. I have set show-all-if-ambiguous off in my .inputrc which is overwritten by bash-sensible. Thus, I need to set it a second time in .bashrc after loading bash-sensible.)
  2. Make these great defaults also available to other programs that use readline (python REPL, etc).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.