annotate rc/shellinit-posix @ 739:2cf87b7ca09a default tip

Update vendored stuff
author nanaya <me@nanaya.net>
date Thu, 09 Jan 2025 03:28:23 +0900
parents 002d6aa2d76e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
527
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 #!/bin/sh
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
2
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 _os="$(uname)"
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
4
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 export LANG="en_US.UTF-8"
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 export LC_CTYPE="en_US.UTF-8"
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 # The en_US.UTF-8 causes weird sorting.
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 # (not really, but I prefer C based sort.)
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 export LC_COLLATE=C
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 export LC_MESSAGES=C
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
11
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 if command -v vim > /dev/null 2>&1; then
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 alias vi=vim
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 export EDITOR=vim
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 fi
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
16
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 if command -v less > /dev/null 2>&1; then
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 export PAGER=less
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 export LESS=-FMRXginsz-2
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 fi
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
21
528
92eb89781346 Enforce emacs-style commandline editor.
edogawaconan <me@myconan.net>
parents: 527
diff changeset
22 # Must be set after setting $EDITOR.
92eb89781346 Enforce emacs-style commandline editor.
edogawaconan <me@myconan.net>
parents: 527
diff changeset
23 set -o emacs
92eb89781346 Enforce emacs-style commandline editor.
edogawaconan <me@myconan.net>
parents: 527
diff changeset
24
527
cb4e2a6595ea Add ksh support.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 unset _os