diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2016-04-21 00:15:58 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2016-04-21 00:15:58 +0200 |
| commit | 6da0278175debd86ed6b339c4b0233c2074027c4 (patch) | |
| tree | 4deb685731d3efabf47783351bdde44fbfe63a57 | |
| parent | e09048dabf036f0845827ce829e249d3a18ce175 (diff) | |
| download | dotfiles-6da0278175debd86ed6b339c4b0233c2074027c4.tar.gz dotfiles-6da0278175debd86ed6b339c4b0233c2074027c4.zip | |
bashrc: updated the td function
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
| -rw-r--r-- | bashrc | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |
