aboutsummaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2016-04-21 00:15:58 +0200
committerMiquel Sabaté Solà <msabate@suse.com>2016-04-21 00:15:58 +0200
commit6da0278175debd86ed6b339c4b0233c2074027c4 (patch)
tree4deb685731d3efabf47783351bdde44fbfe63a57 /bashrc
parente09048dabf036f0845827ce829e249d3a18ce175 (diff)
downloaddotfiles-6da0278175debd86ed6b339c4b0233c2074027c4.tar.gz
dotfiles-6da0278175debd86ed6b339c4b0233c2074027c4.zip
bashrc: updated the td function
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc11
1 files changed, 9 insertions, 2 deletions
diff --git a/bashrc b/bashrc
index b9e7b9c..b80372e 100644
--- a/bashrc
+++ b/bashrc
@@ -95,7 +95,14 @@ source_maybe $HOME/.gcompletion.sh
# The td utility. See: https://github.com/mssola/td
td() {
- # TODO: use a proper certificate on the server...
+ # If we are editing, pick the default layout. Otherwise, just execute the
+ # given arguments.
+ if [ -z "$1" ]; then
+ args="--file /root/.td/auto.txt"
+ else
+ args="$@"
+ fi
+
docker run -it \
-v $HOME/.td:/root/.td \
-v $HOME/.vimrc:/root/.vimrc:ro \
@@ -104,7 +111,7 @@ td() {
-e EDITOR=vim \
--rm \
--detach-keys "ctrl-a,a" \
- mssola/td:latest "$@"
+ mssola/td:latest "$args"
}
source_maybe $HOME/.tdcompletion.sh