mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-04-11 04:01:51 +00:00
switch code indentation to hard tabs
also update code guidelines.
This commit is contained in:
parent
70abf31bab
commit
7951645db5
@ -4,11 +4,7 @@ Style guidelines
|
||||
Indentation
|
||||
-----------
|
||||
|
||||
Code must be indented using four spaces.
|
||||
In vim, this can be accomplished using
|
||||
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
Code must be indented using hard tabs.
|
||||
|
||||
Naming
|
||||
------
|
||||
|
10
tomb
10
tomb
@ -176,7 +176,7 @@ TRAPSTOP() { _endgame STOP }
|
||||
_cat() { local -a _arr;
|
||||
# read file using mapfile, newline fix
|
||||
_arr=("${(f@)${mapfile[${1}]%$'\n'}}"); print "$_arr"
|
||||
}
|
||||
}
|
||||
|
||||
_is_found() {
|
||||
# returns 0 if binary is found in path
|
||||
@ -1651,7 +1651,7 @@ forge_key() {
|
||||
[[ -z "$destkey" ]] && {
|
||||
_failure "A filename needs to be specified using -k to forge a new key." }
|
||||
|
||||
# _message "Commanded to forge key ::1 key::" $destkey
|
||||
# _message "Commanded to forge key ::1 key::" $destkey
|
||||
|
||||
_check_swap # Ensure the available memory is safe to use
|
||||
|
||||
@ -2029,9 +2029,8 @@ mount_tomb() {
|
||||
{ option_is_set -o } && {
|
||||
local oldmountopts=$MOUNTOPTS
|
||||
MOUNTOPTS="$(option_value -o)" }
|
||||
|
||||
# TODO: safety check MOUNTOPTS
|
||||
# safe_mount_options && \
|
||||
# safe_mount_options &&
|
||||
_sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount}
|
||||
# Clean up if the mount failed
|
||||
[[ $? == 0 ]] || {
|
||||
@ -3138,6 +3137,3 @@ EOF
|
||||
main "$@" || exit $? # Prevent `source tomb source` from exiting
|
||||
|
||||
# }}}
|
||||
|
||||
# -*- tab-width: 4; indent-tabs-mode:nil; -*-
|
||||
# vim: set shiftwidth=4 expandtab:
|
||||
|
Loading…
x
Reference in New Issue
Block a user