From 101149b1ae6fb5ce0b982289fca901b2feab5439 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:53:14 +0100 Subject: Moves remaining aliases to misc and deletes file. There were only three aliases left in aliases.zsh File deleted! --- lib/misc.zsh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/misc.zsh') diff --git a/lib/misc.zsh b/lib/misc.zsh index a8678b8ec..892d78ef3 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -13,3 +13,10 @@ export PAGER="less" export LESS="-R" export LC_CTYPE=$LANG + +## super user alias +alias _='sudo' +alias please='sudo' + +## more intelligent acking for ubuntu users +alias afind='ack-grep -il' -- cgit v1.2.3-70-g09d2 From 83c4e0620689d2410056bddcdfbf8e300673e982 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:55:10 +0100 Subject: Moves a bindkey call from misc to key-bindings. --- lib/key-bindings.zsh | 3 +++ lib/misc.zsh | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/misc.zsh') diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 9063c6a18..eb2b58058 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -64,6 +64,9 @@ autoload -U edit-command-line zle -N edit-command-line bindkey '\C-x\C-e' edit-command-line +# file rename magick +bindkey "^[m" copy-prev-shell-word + # consider emacs keybindings: #bindkey -e ## emacs key bindings diff --git a/lib/misc.zsh b/lib/misc.zsh index 892d78ef3..ea8a05fcb 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -2,9 +2,6 @@ autoload -U url-quote-magic zle -N self-insert url-quote-magic -## file rename magick -bindkey "^[m" copy-prev-shell-word - ## jobs setopt long_list_jobs -- cgit v1.2.3-70-g09d2 From 448e966129bb5c08c7b2da4636491f0f890cf0ab Mon Sep 17 00:00:00 2001 From: frozen_dude Date: Mon, 29 Jul 2013 20:04:23 +0200 Subject: Fix for bad LC_CTYPE entry LANG is a colon-separated list of prefered locales; LC_CTYPE is single entry, therefore we need to remove all but one entry. Also, there is no need setting it if it is already set (LC_ALL also sets LC_CTYPE, so we check it too). --- lib/misc.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/misc.zsh') diff --git a/lib/misc.zsh b/lib/misc.zsh index ea8a05fcb..6987c099c 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -9,11 +9,21 @@ setopt long_list_jobs export PAGER="less" export LESS="-R" -export LC_CTYPE=$LANG - ## super user alias alias _='sudo' alias please='sudo' ## more intelligent acking for ubuntu users alias afind='ack-grep -il' + +## how to interpret text characters +if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined + export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1` + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=`locale -a | grep en_US | head -1` + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=C # default to internal encoding. +fi + -- cgit v1.2.3-70-g09d2 From 0edf416bea1a180e82a8f5f96444d74fabb5867f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 9 Feb 2015 18:57:23 +0100 Subject: Temporarily delete over-engineered solution --- lib/misc.zsh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib/misc.zsh') diff --git a/lib/misc.zsh b/lib/misc.zsh index 6987c099c..0b7cb2696 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -16,14 +16,7 @@ alias please='sudo' ## more intelligent acking for ubuntu users alias afind='ack-grep -il' -## how to interpret text characters -if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined - export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1` - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=`locale -a | grep en_US | head -1` - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=C # default to internal encoding. +# only define LC_CTYPE if undefined +if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then + export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG fi - -- cgit v1.2.3-70-g09d2